Package jminusminus
Class TypeName
java.lang.Object
jminusminus.Type
jminusminus.TypeName
A representation of any reference type that can be denoted as a (possibly qualified) identifier.
-
Field Summary
Fields inherited from class jminusminus.Type
ANY, BOOLEAN, BOXED_BOOLEAN, BOXED_CHAR, BOXED_DOUBLE, BOXED_INT, BOXED_LONG, CHAR, CONSTRUCTOR, DOUBLE, INT, LONG, NULLTYPE, OBJECT, STRING, VOID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjvmName()
Returns the JVM representation of this type's name.int
line()
Returns the line in which the identifier occurs in the source file.Resolves this type in the given context and returns the resolved type.Returns the simple (unqualified) name of this type.Returns the JVM descriptor of this type.toString()
Returns a string representation of this type.Methods inherited from class jminusminus.Type
abstractMethods, argTypesAsString, argTypesMatch, argumentTypeForAppend, checkAccess, checkAccess, checkAccess, classRep, componentType, constructorFor, equals, fieldFor, isAbstract, isArray, isFinal, isInterface, isJavaAssignableFrom, isPrimitive, isReference, matchesExpected, methodFor, mustMatchExpected, mustMatchOneOf, packageName, setClassRep, signatureFor, superClass, typeFor
-
Constructor Details
-
TypeName
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
Returns the JVM representation of this type's name. -
toDescriptor
Returns the JVM descriptor of this type.- Overrides:
toDescriptor
in classType
- Returns:
- the JVM descriptor of this type.
-
toString
Returns a string representation of this type. -
simpleName
Returns the simple (unqualified) name of this type.- Overrides:
simpleName
in classType
- Returns:
- the simple (unqualified) name of this type.
-
resolve
Resolves this type in the given context and returns the resolved type.
-