Top Description Fields Constructors Methods
javassist

public final Class CtPrimitiveType

extends CtClass
Class Inheritance

An instance of CtPrimitiveType represents a primitive type. It is obtained from CtClass.

Field Summary

Modifier and TypeField and Description
private int
private int
private char
private String
private String
private int
private String
Inherited from javassist.CtClass:
booleanTypebyteTypecharTypedebugDumpdoubleTypefloatTypeintTypejavaLangObjectlongTypeprimitiveTypesqualifiedNameshortTypeversionvoidType

Constructor Summary

AccessConstructor and Description
pack-priv
CtPrimitiveType(String name, char desc, String wrapper, String methodName, String mDesc, int opcode, int atype, int size)

Method Summary

Modifier and TypeMethod and Description
public int
getArrayType()

Returns the array-type code representing the type.

public int
getDataSize()

Returns the data size of the primitive type.

public char
getDescriptor()

Returns the descriptor representing this type.

public String
getGetMethodDescriptor()

Returns the descriptor of the method for retrieving the value from the wrapper object.

public String
getGetMethodName()

Returns the name of the method for retrieving the value from the wrapper object.

public int
getModifiers()

Overrides javassist.CtClass.getModifiers.

Returns the modifiers for this type.

public int
getReturnOp()

Returns the opcode for returning a value of the type.

public String
getWrapperName()

Returns the name of the wrapper class.

public boolean
isPrimitive()

Overrides javassist.CtClass.isPrimitive.

Returns true if this object represents a primitive Java type: boolean, byte, char, short, int, long, float, double, or void.

Inherited from javassist.CtClass:
addConstructoraddFieldaddFieldaddFieldaddInterfaceaddMethodcheckModifycompressdebugWriteFiledebugWriteFiledefrostdetachextendToStringfreezegetAccessorMakergetAnnotationgetAnnotationsgetAttributegetAvailableAnnotationsgetClassFilegetClassFile2getClassInitializergetClassPoolgetComponentTypegetConstructorgetConstructorsgetDeclaredBehaviorsgetDeclaredClassesgetDeclaredConstructorgetDeclaredConstructorsgetDeclaredFieldgetDeclaredFieldgetDeclaredFieldsgetDeclaredMethodgetDeclaredMethodgetDeclaredMethodsgetDeclaredMethodsgetDeclaringClassgetEnclosingBehaviorgetEnclosingMethodgetFieldgetFieldgetField2getFieldsgetGenericSignaturegetInterfacesgetMethodgetMethodsgetNamegetNestedClassesgetPackageNamegetRefClassesgetSimpleNamegetSuperclassgetURLhasAnnotationhasAnnotationincGetCounterinstrumentinstrumentisAnnotationisArrayisEnumisFrozenisInterfaceisKotlinisModifiedmainmakeClassInitializermakeFileOutputmakeNestedClassmakeUniqueNameprunerebuildClassFileremoveConstructorremoveFieldremoveMethodreplaceClassNamereplaceClassNamesetAttributesetGenericSignaturesetInterfacessetModifierssetNamesetSuperclassstopPruningsubclassOfsubtypeOftoBytecodetoBytecodetoClasstoClasstoClasstoClasstoClasstoStringwriteFilewriteFile

Field Detail

arrayTypeback to summary
private int arrayType
dataSizeback to summary
private int dataSize
descriptorback to summary
private char descriptor
getMethodNameback to summary
private String getMethodName
mDescriptorback to summary
private String mDescriptor
returnOpback to summary
private int returnOp
wrapperNameback to summary
private String wrapperName

Constructor Detail

CtPrimitiveTypeback to summary
pack-priv CtPrimitiveType(String name, char desc, String wrapper, String methodName, String mDesc, int opcode, int atype, int size)

Method Detail

getArrayTypeback to summary
public int getArrayType()

Returns the array-type code representing the type. It is used for the newarray instruction. For example, if the type is int, then this method returns javassit.bytecode.Opcode.T_INT.

getDataSizeback to summary
public int getDataSize()

Returns the data size of the primitive type. If the type is long or double, this method returns 2. Otherwise, it returns 1.

getDescriptorback to summary
public char getDescriptor()

Returns the descriptor representing this type. For example, if the type is int, then the descriptor is I.

getGetMethodDescriptorback to summary
public String getGetMethodDescriptor()

Returns the descriptor of the method for retrieving the value from the wrapper object. For example, if the type is int, then the method descriptor is ()I.

getGetMethodNameback to summary
public String getGetMethodName()

Returns the name of the method for retrieving the value from the wrapper object. For example, if the type is int, then the method name is intValue.

getModifiersback to summary
public int getModifiers()

Overrides javassist.CtClass.getModifiers.

Returns the modifiers for this type. For decoding, use javassist.Modifier.

Annotations
@Override
See Also
Modifier
getReturnOpback to summary
public int getReturnOp()

Returns the opcode for returning a value of the type. For example, if the type is int, then the returned opcode is javassit.bytecode.Opcode.IRETURN.

getWrapperNameback to summary
public String getWrapperName()

Returns the name of the wrapper class. For example, if the type is int, then the wrapper class is java.lang.Integer.

isPrimitiveback to summary
public boolean isPrimitive()

Overrides javassist.CtClass.isPrimitive.

Returns true if this object represents a primitive Java type: boolean, byte, char, short, int, long, float, double, or void.

Annotations
@Override