mirror of
https://github.com/github/codeql.git
synced 2025-12-20 18:56:32 +01:00
Java: Sync files and make language specific implementation.
This commit is contained in:
@@ -38,7 +38,9 @@ class DataFlowSourceTargetApi = SourceTargetApi;
|
|||||||
class DataFlowSinkTargetApi = SinkTargetApi;
|
class DataFlowSinkTargetApi = SinkTargetApi;
|
||||||
|
|
||||||
private module ModelPrintingInput implements ModelPrintingSig {
|
private module ModelPrintingInput implements ModelPrintingSig {
|
||||||
class Api = TargetApiBase;
|
class SummaryApi = DataFlowSummaryTargetApi;
|
||||||
|
|
||||||
|
class SourceOrSinkApi = SourceOrSinkTargetApi;
|
||||||
|
|
||||||
string getProvenance() { result = "df-generated" }
|
string getProvenance() { result = "df-generated" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,25 +83,25 @@ predicate isUninterestingForDataFlowModels(Callable api) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class of callables that are potentially relevant for generating summary and
|
* A class of callables that are potentially relevant for generating source or
|
||||||
* neutral models.
|
* sink models.
|
||||||
*/
|
*/
|
||||||
class SummaryTargetApi extends TargetApiBase {
|
class SourceOrSinkTargetApi extends Callable {
|
||||||
SummaryTargetApi() { not hasManualSummaryModel(this.lift()) }
|
SourceOrSinkTargetApi() { relevant(this) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class of callables that are potentially relevant for generating sink models.
|
* A class of callables that are potentially relevant for generating sink models.
|
||||||
*/
|
*/
|
||||||
class SinkTargetApi extends TargetApiBase {
|
class SinkTargetApi extends SourceOrSinkTargetApi {
|
||||||
SinkTargetApi() { not hasManualSinkModel(this.lift()) }
|
SinkTargetApi() { not hasManualSinkModel(this) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class of callables that are potentially relevant for generating source models.
|
* A class of callables that are potentially relevant for generating source models.
|
||||||
*/
|
*/
|
||||||
class SourceTargetApi extends TargetApiBase {
|
class SourceTargetApi extends SourceOrSinkTargetApi {
|
||||||
SourceTargetApi() { not hasManualSourceModel(this.lift()) }
|
SourceTargetApi() { not hasManualSourceModel(this) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,16 +112,19 @@ class SourceTargetApi extends TargetApiBase {
|
|||||||
predicate isUninterestingForTypeBasedFlowModels(Callable api) { none() }
|
predicate isUninterestingForTypeBasedFlowModels(Callable api) { none() }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A class of callables that are potentially relevant for generating summary, source, sink
|
* A class of callables that are potentially relevant for generating summary or
|
||||||
* and neutral models.
|
* neutral models.
|
||||||
*
|
*
|
||||||
* In the Standard library and 3rd party libraries it is the callables (or callables that have a
|
* In the Standard library and 3rd party libraries it is the callables (or callables that have a
|
||||||
* super implementation) that can be called from outside the library itself.
|
* super implementation) that can be called from outside the library itself.
|
||||||
*/
|
*/
|
||||||
class TargetApiBase extends Callable {
|
class SummaryTargetApi extends Callable {
|
||||||
private Callable lift;
|
private Callable lift;
|
||||||
|
|
||||||
TargetApiBase() { lift = liftedImpl(this) }
|
SummaryTargetApi() {
|
||||||
|
lift = liftedImpl(this) and
|
||||||
|
not hasManualSummaryModel(lift)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the callable that a model will be lifted to.
|
* Gets the callable that a model will be lifted to.
|
||||||
|
|||||||
@@ -284,7 +284,9 @@ private predicate output(Callable callable, TypeVariable tv, string output) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module ModelPrintingInput implements ModelPrintingSig {
|
module ModelPrintingInput implements ModelPrintingSig {
|
||||||
class Api = TypeBasedFlowTargetApi;
|
class SummaryApi = TypeBasedFlowTargetApi;
|
||||||
|
|
||||||
|
class SourceOrSinkApi = Specific::SourceOrSinkTargetApi;
|
||||||
|
|
||||||
string getProvenance() { result = "tb-generated" }
|
string getProvenance() { result = "tb-generated" }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user