| Package | Description |
|---|---|
| xapi.bytecode | |
| xapi.bytecode.annotation |
| Modifier and Type | Method and Description |
|---|---|
ClassPath |
ClassPool.appendClassPath(String pathname)
Appends a directory or a jar (or zip) file to the end of the
search path.
|
void |
ClassPool.appendPathList(String pathlist)
Appends directories and jar files for search.
|
CtClass |
ClassPool.get(String classname)
Reads a class file from the source and returns a reference
to the
CtClass
object representing that class file. |
CtClass[] |
ClassPool.get(String[] classnames)
Reads class files from the source and returns an array of
CtClass
objects representing those class files. |
protected CtClass |
ClassPool.get0(String classname,
boolean useCache) |
CtClass |
ClassPool.getAndRename(String orgName,
String newName)
Reads a class file and constructs a
CtClass
object with a new name. |
CtClass |
CtClass.getComponentType()
If this object represents an array, this method returns the component
type of the array.
|
CtConstructor |
CtClassType.getConstructor(String desc) |
CtConstructor |
CtClass.getConstructor(String desc)
Returns the constructor with the given signature,
which is represented by a character string
called method descriptor.
|
CtClass |
ClassPool.getCtClass(String classname)
Returns a
CtClass object with the given name. |
CtConstructor |
CtClass.getDeclaredConstructor(CtClass[] params)
Returns a constructor receiving the specified parameters.
|
CtField |
CtClassType.getDeclaredField(String name) |
CtField |
CtClass.getDeclaredField(String name)
Retrieves the field with the specified name among the fields
declared in the class.
|
CtField |
CtClassType.getDeclaredField(String name,
String desc) |
CtMethod |
CtClassType.getDeclaredMethod(String name) |
CtMethod |
CtClass.getDeclaredMethod(String name)
Retrieves the method with the specified name among the methods
declared in the class.
|
CtMethod |
CtClassType.getDeclaredMethod(String name,
CtClass[] params) |
CtMethod |
CtClass.getDeclaredMethod(String name,
CtClass[] params)
Retrieves the method with the specified name and parameter types
among the methods declared in the class.
|
CtClass |
CtClassType.getDeclaringClass() |
CtClass |
CtClass.getDeclaringClass()
If this class is a member class or interface of another class,
then the class enclosing this class is returned.
|
CtMethod |
CtClass.getEnclosingMethod()
Returns the immediately enclosing method of this class.
|
CtClass[] |
CtBehavior.getExceptionTypes()
Obtains exceptions that this method/constructor may throw.
|
CtField |
CtClassType.getField(String name) |
CtField |
CtClass.getField(String name)
Returns the field with the specified name.
|
CtField |
CtClassType.getField(String name,
String desc) |
CtClass[] |
CtClassType.getInterfaces() |
CtClass[] |
CtClass.getInterfaces()
Obtains the class objects representing the interfaces implemented
by the class or, if this object represents an interface, the interfaces
extended by that interface.
|
CtMethod |
CtClassType.getMethod(String name,
String desc) |
CtMethod |
CtClass.getMethod(String name,
String desc)
Returns the method with the given name and signature.
|
CtClass[] |
CtClassType.getNestedClasses() |
CtClass[] |
CtClass.getNestedClasses()
Returns an array of nested classes declared in the class.
|
CtClass[] |
CtBehavior.getParameterTypes()
Obtains parameter types of this method/constructor.
|
static CtClass[] |
Descriptor.getParameterTypes(String desc,
ClassPool cp)
Returns the
CtClass objects representing the parameter
types specified by the given descriptor. |
CtClass |
CtMethod.getReturnType()
Obtains the type of the returned value.
|
static CtClass |
Descriptor.getReturnType(String desc,
ClassPool cp)
Returns the
CtClass object representing the return
type specified by the given descriptor. |
CtClass |
CtClassType.getSuperclass() |
CtClass |
CtClass.getSuperclass()
Obtains the class object representing the superclass of the
class.
|
CtClass |
CtField.getType()
Returns the type of the field.
|
URL |
CtClassType.getURL() |
URL |
CtClass.getURL()
Returns the uniform resource locator (URL) of the class file.
|
ClassPath |
ClassPool.insertClassPath(String pathname)
Inserts a directory or a jar (or zip) file at the head of the
search path.
|
InputStream |
ClassPath.openClassfile(String classname)
Opens a class file.
|
void |
CtClassType.removeConstructor(CtConstructor m) |
void |
CtClass.removeConstructor(CtConstructor c)
Removes a constructor declared in this class.
|
void |
CtClassType.removeField(CtField f) |
void |
CtClass.removeField(CtField f)
Removes a field declared in this class.
|
void |
CtClassType.removeMethod(CtMethod m) |
void |
CtClass.removeMethod(CtMethod m)
Removes a method declared in this class.
|
void |
CtBehavior.setExceptionTypes(CtClass[] types)
Sets exceptions that this method/constructor may throw.
|
boolean |
CtClassType.subtypeOf(CtClass clazz) |
boolean |
CtClass.subtypeOf(CtClass clazz)
Returns
true if this class extends or implements
clazz. |
static CtClass |
Descriptor.toCtClass(String desc,
ClassPool cp)
Returns a
CtClass object representing the type
specified by the given descriptor. |
void |
CtClass.writeFile()
Writes a class file represented by this
CtClass
object in the current directory. |
| Constructor and Description |
|---|
CannotCompileException(NotFoundException e)
Constructs a CannotCompileException with a
NotFoundException. |
| Modifier and Type | Method and Description |
|---|---|
static MemberValue |
Annotation.createMemberValue(ConstPool cp,
CtClass type)
Makes an instance of
MemberValue. |
| Constructor and Description |
|---|
Annotation(ConstPool cp,
CtClass clazz)
Constructs an annotation that can be accessed through the interface
represented by
clazz. |
Copyright © December 07, 2012–2015 The Internet Party. All rights reserved.