Package javassist.bytecode
Class SignatureAttribute.ClassType
- java.lang.Object
-
- javassist.bytecode.SignatureAttribute.Type
-
- javassist.bytecode.SignatureAttribute.ObjectType
-
- javassist.bytecode.SignatureAttribute.ClassType
-
- Direct Known Subclasses:
SignatureAttribute.NestedClassType
- Enclosing class:
- SignatureAttribute
public static class SignatureAttribute.ClassType extends SignatureAttribute.ObjectType
Class types.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) SignatureAttribute.TypeArgument[]
arguments
(package private) java.lang.String
name
static SignatureAttribute.ClassType
OBJECT
A class type representingjava.lang.Object
.
-
Constructor Summary
Constructors Constructor Description ClassType(java.lang.String className)
Constructs aClassType
.ClassType(java.lang.String signature, int begin, int end, SignatureAttribute.TypeArgument[] targs)
ClassType(java.lang.String className, SignatureAttribute.TypeArgument[] args)
Constructs aClassType
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
encode(java.lang.StringBuffer sb)
(package private) void
encode2(java.lang.StringBuffer sb)
SignatureAttribute.ClassType
getDeclaringClass()
If this class is a member of another class, returns the class in which this class is declared.java.lang.String
getName()
Returns the class name.SignatureAttribute.TypeArgument[]
getTypeArguments()
Returns the type arguments.java.lang.String
jvmTypeName()
Returns the type name in the JVM internal style.(package private) static SignatureAttribute.ClassType
make(java.lang.String s, int b, int e, SignatureAttribute.TypeArgument[] targs, SignatureAttribute.ClassType parent)
java.lang.String
toString()
Returns the string representation.private java.lang.String
toString2(java.lang.StringBuffer sbuf)
-
Methods inherited from class javassist.bytecode.SignatureAttribute.ObjectType
encode
-
Methods inherited from class javassist.bytecode.SignatureAttribute.Type
toString
-
-
-
-
Field Detail
-
name
java.lang.String name
-
arguments
SignatureAttribute.TypeArgument[] arguments
-
OBJECT
public static SignatureAttribute.ClassType OBJECT
A class type representingjava.lang.Object
.
-
-
Constructor Detail
-
ClassType
ClassType(java.lang.String signature, int begin, int end, SignatureAttribute.TypeArgument[] targs)
-
ClassType
public ClassType(java.lang.String className, SignatureAttribute.TypeArgument[] args)
Constructs aClassType
. It represents the name of a non-nested class.- Parameters:
className
- a fully qualified class name.args
- type arguments or null.
-
ClassType
public ClassType(java.lang.String className)
Constructs aClassType
. It represents the name of a non-nested class.- Parameters:
className
- a fully qualified class name.
-
-
Method Detail
-
make
static SignatureAttribute.ClassType make(java.lang.String s, int b, int e, SignatureAttribute.TypeArgument[] targs, SignatureAttribute.ClassType parent)
-
getName
public java.lang.String getName()
Returns the class name.
-
getTypeArguments
public SignatureAttribute.TypeArgument[] getTypeArguments()
Returns the type arguments.- Returns:
- null if no type arguments are given to this class.
-
getDeclaringClass
public SignatureAttribute.ClassType getDeclaringClass()
If this class is a member of another class, returns the class in which this class is declared.- Returns:
- null if this class is not a member of another class.
-
toString
public java.lang.String toString()
Returns the string representation.- Overrides:
toString
in classjava.lang.Object
-
toString2
private java.lang.String toString2(java.lang.StringBuffer sbuf)
-
jvmTypeName
public java.lang.String jvmTypeName()
Returns the type name in the JVM internal style. For example, if the type is a nested classfoo.Bar.Baz
, thenfoo.Bar$Baz
is returned.- Overrides:
jvmTypeName
in classSignatureAttribute.Type
-
encode
void encode(java.lang.StringBuffer sb)
- Specified by:
encode
in classSignatureAttribute.Type
-
encode2
void encode2(java.lang.StringBuffer sb)
-
-