java.lang.Object
org.checkerframework.afu.scenelib.type.Type
Direct Known Subclasses:
ArrayType, BoundedType, DeclaredType

public abstract class Type extends Object
A representation of a Java type. Handles type parameters, bounded types, arrays and inner types.
  • Constructor Details

    • Type

      public Type()
      Constructs a new type with no outer annotations.
  • Method Details

    • addAnnotation

      public void addAnnotation(String annotation)
      Adds an outer annotation to this type.
      Parameters:
      annotation - the annotation to add
    • setAnnotations

      public void setAnnotations(List<String> annotations)
      Replaces the annotations on this type with the given annotations.
      Parameters:
      annotations - the new annotations to be placed on this type
    • getAnnotation

      public String getAnnotation(int index)
      Gets an outer annotation on this type at the given index.
      Parameters:
      index - the index
      Returns:
      the annotation
    • getAnnotations

      public List<String> 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

      public abstract Type.Kind getKind()
      Gets the Type.Kind of this Type.
      Returns:
      the kind