Only stub declarations from libraries

This commit is contained in:
Tamas Vajk
2021-04-16 11:25:56 +02:00
parent eabf6b0be8
commit 53655d4ae4
3 changed files with 5 additions and 7 deletions

View File

@@ -7,10 +7,7 @@ import Stubs
/** All public declarations from assemblies. */
class AllExternalPublicDeclarations extends GeneratedDeclaration {
AllExternalPublicDeclarations() {
this.fromLibrary() and
this.(Modifiable).isEffectivelyPublic()
}
AllExternalPublicDeclarations() { this.fromLibrary() }
}
/** All framework assemblies. */

View File

@@ -25,8 +25,7 @@ class UsedInSource extends GeneratedDeclaration {
or
this = any(Attribute a).getType().getAConstructor()
) and
this.fromLibrary() and
this.(Modifiable).isEffectivelyPublic()
this.fromLibrary()
}
}

View File

@@ -148,7 +148,9 @@ abstract private class GeneratedType extends ValueOrRefType, GeneratedElement {
* This is extended in client code to identify the actual
* declarations that should be generated.
*/
abstract class GeneratedDeclaration extends Declaration { }
abstract class GeneratedDeclaration extends Declaration {
GeneratedDeclaration() { this.(Modifiable).isEffectivelyPublic() }
}
private class IndirectType extends GeneratedType {
IndirectType() {