Package jminusminus

Class ArrayTypeName

java.lang.Object
jminusminus.Type
jminusminus.ArrayTypeName

class ArrayTypeName extends Type
A representation of an array type. It is built by the Parser to stand in for a Type until the analyze() phase, at which point it is resolved to an actual Type object (having a Class that identifies it).
  • Constructor Details

    • ArrayTypeName

      public ArrayTypeName(Type componentType)
      Constructs an ArrayTypeName given its component type.
      Parameters:
      componentType - the type of the array's elements.
  • Method Details

    • componentType

      public Type componentType()
      Returns an array type's component type.
      Overrides:
      componentType in class Type
      Returns:
      an array type's component type.
    • toDescriptor

      public String toDescriptor()
      Returns the JVM descriptor of this type.
      Overrides:
      toDescriptor in class Type
      Returns:
      the JVM descriptor of this type.
    • toString

      public String toString()
      Returns a string representation of this type.
      Overrides:
      toString in class Type
      Returns:
      a string representation of this type.
    • resolve

      public Type resolve(Context context)
      Resolves this type in the given context and returns the resolved type.
      Overrides:
      resolve in class Type
      Parameters:
      context - context in which the names are resolved.
      Returns:
      the resolved type.