Package org.openjdk.jmc.common.util
Class MCType
- java.lang.Object
-
- org.openjdk.jmc.common.util.MCType
-
-
Field Summary
Fields Modifier and Type Field Description private IMCPackage_packageprivate java.lang.StringfullNameprivate static charINNER_CLASS_SEPARATORprivate static charPACKAGE_SEPARATORprivate java.lang.StringtypeName(package private) static IMCTypeUNKNOWNConstant indicating an unknown Java type.
-
Constructor Summary
Constructors Constructor Description MCType(java.lang.String jlsTypeName)Create an instance from a binary Java type name according to The Java Language Specification, Section 13.1.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)private static intfindPackageNameLength(java.lang.String jlsTypeName)java.lang.StringgetFullName()Java type name according to The Java Language Specification, Section 13.1.IMCPackagegetPackage()Returns the package this type was declared in.java.lang.StringgetTypeName()Returns the name of the type, without the package.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
UNKNOWN
static final IMCType UNKNOWN
Constant indicating an unknown Java type. Only used to avoid returning null types.
-
PACKAGE_SEPARATOR
private static final char PACKAGE_SEPARATOR
- See Also:
- Constant Field Values
-
INNER_CLASS_SEPARATOR
private static final char INNER_CLASS_SEPARATOR
- See Also:
- Constant Field Values
-
fullName
private final java.lang.String fullName
-
typeName
private final java.lang.String typeName
-
_package
private final IMCPackage _package
-
-
Method Detail
-
findPackageNameLength
private static int findPackageNameLength(java.lang.String jlsTypeName)
-
getPackage
public IMCPackage getPackage()
Description copied from interface:IMCTypeReturns the package this type was declared in.- Specified by:
getPackagein interfaceIMCType- Returns:
- declaring package
-
getTypeName
public final java.lang.String getTypeName()
Description copied from interface:IMCTypeReturns the name of the type, without the package.Examples are "String" and "Tread$TreadState".
- Specified by:
getTypeNamein interfaceIMCType- Returns:
- the type name
-
getFullName
public final java.lang.String getFullName()
Description copied from interface:IMCTypeJava type name according to The Java Language Specification, Section 13.1.An example is "java.lang.String".
- Specified by:
getFullNamein interfaceIMCType- Returns:
- the fully qualified name (both package and type name)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-