| java.lang.Object javassist.CtClass javassist.CtPrimitiveType
CtPrimitiveType | final public class CtPrimitiveType extends CtClass (Code) | | An instance of CtPrimitiveType represents a primitive type.
It is obtained from CtClass .
|
Method Summary | |
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 | getReturnOp() Returns the opcode for returning a value of the type. | public String | getWrapperName() Returns the name of the wrapper class. | public boolean | isPrimitive() Returns true if this object represents a primitive
Java type: boolean, byte, char, short, int, long, float, double,
or void. |
getArrayType | public int getArrayType()(Code) | | 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 .
|
getDataSize | public int getDataSize()(Code) | | Returns the data size of the primitive type.
If the type is long or double, this method returns 2.
Otherwise, it returns 1.
|
getDescriptor | public char getDescriptor()(Code) | | Returns the descriptor representing this type.
For example, if the type is int, then the descriptor is I.
|
getGetMethodDescriptor | public String getGetMethodDescriptor()(Code) | | 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 .
|
getGetMethodName | public String getGetMethodName()(Code) | | 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 .
|
getReturnOp | public int getReturnOp()(Code) | | 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 .
|
getWrapperName | public String getWrapperName()(Code) | | Returns the name of the wrapper class.
For example, if the type is int, then the wrapper class is
java.lang.Integer .
|
isPrimitive | public boolean isPrimitive()(Code) | | Returns true if this object represents a primitive
Java type: boolean, byte, char, short, int, long, float, double,
or void.
|
Methods inherited from javassist.CtClass | public void addConstructor(CtConstructor c) throws CannotCompileException(Code)(Java Doc) public void addField(CtField f) throws CannotCompileException(Code)(Java Doc) public void addField(CtField f, String init) throws CannotCompileException(Code)(Java Doc) public void addField(CtField f, CtField.Initializer init) throws CannotCompileException(Code)(Java Doc) public void addInterface(CtClass anInterface)(Code)(Java Doc) public void addMethod(CtMethod m) throws CannotCompileException(Code)(Java Doc) void checkModify() throws RuntimeException(Code)(Java Doc) public void debugWriteFile()(Code)(Java Doc) public void defrost()(Code)(Java Doc) public void detach()(Code)(Java Doc) protected void extendToString(StringBuffer buffer)(Code)(Java Doc) void freeze()(Code)(Java Doc) public javassist.compiler.AccessorMaker getAccessorMaker()(Code)(Java Doc) public Object[] getAnnotations() throws ClassNotFoundException(Code)(Java Doc) public byte[] getAttribute(String name)(Code)(Java Doc) public Object[] getAvailableAnnotations()(Code)(Java Doc) public ClassFile getClassFile()(Code)(Java Doc) public ClassFile getClassFile2()(Code)(Java Doc) public CtConstructor getClassInitializer()(Code)(Java Doc) public ClassPool getClassPool()(Code)(Java Doc) public CtClass getComponentType() throws NotFoundException(Code)(Java Doc) public CtConstructor getConstructor(String desc) throws NotFoundException(Code)(Java Doc) public CtConstructor[] getConstructors()(Code)(Java Doc) public CtBehavior[] getDeclaredBehaviors()(Code)(Java Doc) public CtConstructor getDeclaredConstructor(CtClass[] params) throws NotFoundException(Code)(Java Doc) public CtConstructor[] getDeclaredConstructors()(Code)(Java Doc) public CtField getDeclaredField(String name) throws NotFoundException(Code)(Java Doc) public CtField[] getDeclaredFields()(Code)(Java Doc) public CtMethod getDeclaredMethod(String name, CtClass[] params) throws NotFoundException(Code)(Java Doc) public CtMethod getDeclaredMethod(String name) throws NotFoundException(Code)(Java Doc) public CtMethod[] getDeclaredMethods()(Code)(Java Doc) public CtClass getDeclaringClass() throws NotFoundException(Code)(Java Doc) public CtMethod getEnclosingMethod() throws NotFoundException(Code)(Java Doc) public CtField getField(String name) throws NotFoundException(Code)(Java Doc) CtField getField2(String name)(Code)(Java Doc) public CtField[] getFields()(Code)(Java Doc) public CtClass[] getInterfaces() throws NotFoundException(Code)(Java Doc) public CtMethod getMethod(String name, String desc) throws NotFoundException(Code)(Java Doc) public CtMethod[] getMethods()(Code)(Java Doc) public int getModifiers()(Code)(Java Doc) public String getName()(Code)(Java Doc) public CtClass[] getNestedClasses() throws NotFoundException(Code)(Java Doc) final public String getPackageName()(Code)(Java Doc) public Collection getRefClasses()(Code)(Java Doc) final public String getSimpleName()(Code)(Java Doc) public CtClass getSuperclass() throws NotFoundException(Code)(Java Doc) public URL getURL() throws NotFoundException(Code)(Java Doc) void incGetCounter()(Code)(Java Doc) public void instrument(CodeConverter converter) throws CannotCompileException(Code)(Java Doc) public void instrument(ExprEditor editor) throws CannotCompileException(Code)(Java Doc) public boolean isAnnotation()(Code)(Java Doc) public boolean isArray()(Code)(Java Doc) public boolean isEnum()(Code)(Java Doc) public boolean isFrozen()(Code)(Java Doc) public boolean isInterface()(Code)(Java Doc) public boolean isModified()(Code)(Java Doc) public boolean isPrimitive()(Code)(Java Doc) public static void main(String[] args)(Code)(Java Doc) public CtConstructor makeClassInitializer() throws CannotCompileException(Code)(Java Doc) public CtClass makeNestedClass(String name, boolean isStatic)(Code)(Java Doc) public String makeUniqueName(String prefix)(Code)(Java Doc) public void prune()(Code)(Java Doc) public void removeConstructor(CtConstructor c) throws NotFoundException(Code)(Java Doc) public void removeField(CtField f) throws NotFoundException(Code)(Java Doc) public void removeMethod(CtMethod m) throws NotFoundException(Code)(Java Doc) public void replaceClassName(String oldName, String newName)(Code)(Java Doc) public void replaceClassName(ClassMap map)(Code)(Java Doc) public void setAttribute(String name, byte[] data)(Code)(Java Doc) public void setInterfaces(CtClass[] list)(Code)(Java Doc) public void setModifiers(int mod)(Code)(Java Doc) public void setName(String name)(Code)(Java Doc) public void setSuperclass(CtClass clazz) throws CannotCompileException(Code)(Java Doc) public boolean stopPruning(boolean stop)(Code)(Java Doc) public boolean subclassOf(CtClass superclass)(Code)(Java Doc) public boolean subtypeOf(CtClass clazz) throws NotFoundException(Code)(Java Doc) public byte[] toBytecode() throws IOException, CannotCompileException(Code)(Java Doc) public void toBytecode(DataOutputStream out) throws CannotCompileException, IOException(Code)(Java Doc) public Class toClass() throws CannotCompileException(Code)(Java Doc) public Class toClass(ClassLoader loader, ProtectionDomain domain) throws CannotCompileException(Code)(Java Doc) final public Class toClass(ClassLoader loader) throws CannotCompileException(Code)(Java Doc) public String toString()(Code)(Java Doc) public void writeFile() throws NotFoundException, IOException, CannotCompileException(Code)(Java Doc) public void writeFile(String directoryName) throws CannotCompileException, IOException(Code)(Java Doc)
|
|
|