Class WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos
java.lang.Object
org.checkerframework.common.wholeprograminference.WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos
- All Implemented Interfaces:
org.plumelib.util.DeepCopyable<WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos>
- Enclosing class:
WholeProgramInferenceJavaParserStorage
public static class WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos
extends Object
implements org.plumelib.util.DeepCopyable<WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos>
Stores wrappers for the locations where annotations may be inferred in a class or interface.
-
Field Summary
FieldsModifier and TypeFieldDescriptionMapping from JVM method signatures to the wrapper containing the corresponding executable.Collection of declared enum constants (empty if not an enum).Mapping from field names to wrappers for those fields. -
Constructor Summary
ConstructorsConstructorDescriptionClassOrInterfaceAnnos(@BinaryName String className, @Nullable com.github.javaparser.ast.body.TypeDeclaration<?> javaParserNode) Create a new ClassOrInterfaceAnnos. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAnnotationToClassDeclaration(AnnotationMirror annotation) Addsannotationto the set of annotations on the declaration of this class.deepCopy()toString()Returns a verbose printed representation of this.voidTransfers all annotations inferred by whole program inference for the methods and fields in the wrapper class or interface to their corresponding JavaParser locations.
-
Field Details
-
callableDeclarations
public Map<String,WholeProgramInferenceJavaParserStorage.CallableDeclarationAnnos> callableDeclarationsMapping from JVM method signatures to the wrapper containing the corresponding executable. -
fields
Mapping from field names to wrappers for those fields. -
enumConstants
Collection of declared enum constants (empty if not an enum).
-
-
Constructor Details
-
ClassOrInterfaceAnnos
public ClassOrInterfaceAnnos(@BinaryName String className, @Nullable com.github.javaparser.ast.body.TypeDeclaration<?> javaParserNode) Create a new ClassOrInterfaceAnnos.- Parameters:
className- the binary name of the classjavaParserNode- the JavaParser node corresponding to the class declaration, which is used for placing annotations on the class declaration
-
-
Method Details
-
deepCopy
- Specified by:
deepCopyin interfaceorg.plumelib.util.DeepCopyable<WholeProgramInferenceJavaParserStorage.ClassOrInterfaceAnnos>
-
addAnnotationToClassDeclaration
Addsannotationto the set of annotations on the declaration of this class.- Parameters:
annotation- an annotation (can be declaration or type)- Returns:
- true if this is a new annotation for this class
-
transferAnnotations
public void transferAnnotations()Transfers all annotations inferred by whole program inference for the methods and fields in the wrapper class or interface to their corresponding JavaParser locations. -
toString
-
toStringVerbose
Returns a verbose printed representation of this.- Returns:
- a verbose printed representation of this
-