Class Type
java.lang.Object
org.checkerframework.afu.scenelib.type.Type
- Direct Known Subclasses:
ArrayType,BoundedType,DeclaredType
A representation of a Java type. Handles type parameters, bounded types, arrays and inner types.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(String annotation) Adds an outer annotation to this type.voidRemoves the annotations from this type.getAnnotation(int index) Gets an outer annotation on this type at the given index.Gets a copy of the outer annotations on this type.abstract Type.KindgetKind()voidsetAnnotations(List<String> annotations) Replaces the annotations on this type with the given annotations.
-
Constructor Details
-
Type
public Type()Constructs a new type with no outer annotations.
-
-
Method Details
-
addAnnotation
Adds an outer annotation to this type.- Parameters:
annotation- the annotation to add
-
setAnnotations
Replaces the annotations on this type with the given annotations.- Parameters:
annotations- the new annotations to be placed on this type
-
getAnnotation
Gets an outer annotation on this type at the given index.- Parameters:
index- the index- Returns:
- the annotation
-
getAnnotations
Gets a copy of the outer annotations on this type. This will be empty if there are none.- Returns:
- the annotations
-
clearAnnotations
public void clearAnnotations()Removes the annotations from this type. -
getKind
- Returns:
- the kind
-