Package jminusminus

Class TypeName

java.lang.Object
jminusminus.Type
jminusminus.TypeName

class TypeName extends Type
A representation of any reference type that can be denoted as a (possibly qualified) identifier.
  • Constructor Details

    • TypeName

      public TypeName(int line, String name)
      Constructs a TypeName.
      Parameters:
      line - the line in which the identifier occurs in the source file.
      name - fully qualified name for the identifier.
  • Method Details

    • line

      public int line()
      Returns the line in which the identifier occurs in the source file.
      Returns:
      the line in which the identifier occurs in the source file.
    • jvmName

      public String jvmName()
      Returns the JVM representation of this type's name.
      Overrides:
      jvmName in class Type
      Returns:
      the JVM representation of this type's name.
    • 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.
    • simpleName

      public String simpleName()
      Returns the simple (unqualified) name of this type.
      Overrides:
      simpleName in class Type
      Returns:
      the simple (unqualified) name 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.