Uses of Class
javassist.CtField
Package
Description
The Javassist Core API.
This package contains the classes for modifying a method body.
-
Uses of CtField in javassist
Modifier and TypeMethodDescriptionCtClass.getDeclaredField
(String name) Retrieves the field with the specified name among the fields declared in the class.CtClass.getDeclaredField
(String name, String desc) Retrieves the field with the specified name and type among the fields declared in the class.CtField[]
CtClass.getDeclaredFields()
Gets all the fields declared in the class.Returns the field with the specified name.Returns the field with the specified name and type.CtField[]
CtClass.getFields()
Returns an array containingCtField
objects representing all the non-private fields of the class.static CtField
Compiles the given source code and creates a field.Modifier and TypeMethodDescriptionvoid
Adds a field.void
Adds a field with an initial value.void
CtClass.addField
(CtField f, CtField.Initializer init) Adds a field with an initial value.static CtMethod
Creates a public getter method.void
CodeConverter.redirectFieldAccess
(CtField field, CtClass newClass, String newFieldname) Modify a method body so that field read/write expressions access a different field from the original one.void
CtClass.removeField
(CtField f) Removes a field declared in this class.void
CodeConverter.replaceFieldRead
(CtField field, CtClass calledClass, String calledMethod) Modify a method body so that an expression reading the specified field is replaced with a call to the specified static method.void
CodeConverter.replaceFieldWrite
(CtField field, CtClass calledClass, String calledMethod) Modify a method body so that an expression writing the specified field is replaced with a call to the specified static method.static CtMethod
Creates a public setter method. -
Uses of CtField in javassist.compiler.ast
-
Uses of CtField in javassist.expr