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;
|
||||
|
||||
private module ModelPrintingInput implements ModelPrintingSig {
|
||||
class Api = TargetApiBase;
|
||||
class SummaryApi = DataFlowSummaryTargetApi;
|
||||
|
||||
class SourceOrSinkApi = SourceOrSinkTargetApi;
|
||||
|
||||
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
|
||||
* neutral models.
|
||||
* A class of callables that are potentially relevant for generating source or
|
||||
* sink models.
|
||||
*/
|
||||
class SummaryTargetApi extends TargetApiBase {
|
||||
SummaryTargetApi() { not hasManualSummaryModel(this.lift()) }
|
||||
class SourceOrSinkTargetApi extends Callable {
|
||||
SourceOrSinkTargetApi() { relevant(this) }
|
||||
}
|
||||
|
||||
/**
|
||||
* A class of callables that are potentially relevant for generating sink models.
|
||||
*/
|
||||
class SinkTargetApi extends TargetApiBase {
|
||||
SinkTargetApi() { not hasManualSinkModel(this.lift()) }
|
||||
class SinkTargetApi extends SourceOrSinkTargetApi {
|
||||
SinkTargetApi() { not hasManualSinkModel(this) }
|
||||
}
|
||||
|
||||
/**
|
||||
* A class of callables that are potentially relevant for generating source models.
|
||||
*/
|
||||
class SourceTargetApi extends TargetApiBase {
|
||||
SourceTargetApi() { not hasManualSourceModel(this.lift()) }
|
||||
class SourceTargetApi extends SourceOrSinkTargetApi {
|
||||
SourceTargetApi() { not hasManualSourceModel(this) }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,16 +112,19 @@ class SourceTargetApi extends TargetApiBase {
|
||||
predicate isUninterestingForTypeBasedFlowModels(Callable api) { none() }
|
||||
|
||||
/**
|
||||
* A class of callables that are potentially relevant for generating summary, source, sink
|
||||
* and neutral models.
|
||||
* A class of callables that are potentially relevant for generating summary or
|
||||
* neutral models.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
class TargetApiBase extends Callable {
|
||||
class SummaryTargetApi extends Callable {
|
||||
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.
|
||||
|
||||
@@ -284,7 +284,9 @@ private predicate output(Callable callable, TypeVariable tv, string output) {
|
||||
}
|
||||
|
||||
module ModelPrintingInput implements ModelPrintingSig {
|
||||
class Api = TypeBasedFlowTargetApi;
|
||||
class SummaryApi = TypeBasedFlowTargetApi;
|
||||
|
||||
class SourceOrSinkApi = Specific::SourceOrSinkTargetApi;
|
||||
|
||||
string getProvenance() { result = "tb-generated" }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user