Uses of Class
javassist.CtField
Packages that use CtField
Package
Description
The Javassist Core API.
This package contains the classes for modifying a method body.
-
Uses of CtField in javassist
Modifier and TypeMethodDescriptionprivate CtField
CtClassType.checkGetField
(CtField f, String name, String desc) CtClass.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.CtClassType.getDeclaredField
(String name) CtClassType.getDeclaredField
(String name, String desc) private CtField
CtClassType.getDeclaredField2
(String name, String desc) CtField[]
CtClass.getDeclaredFields()
Gets all the fields declared in the class.CtField[]
CtClassType.getDeclaredFields()
Returns the field with the specified name.Returns the field with the specified name and type.(package private) CtField
(package private) CtField
CtField[]
CtClass.getFields()
Returns an array containingCtField
objects representing all the non-private fields of the class.CtField[]
CtClassType.getFields()
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.void
void
CtClassType.addField
(CtField f, CtField.Initializer init) private CtField
CtClassType.checkGetField
(CtField f, String name, String desc) 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
CtClassType.removeField
(CtField f) 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.ModifierConstructorDescriptionCreates a copy of the given field.(package private)
-
Uses of CtField in javassist.compiler
Subclasses of CtField in javassist.compilerMethods in javassist.compiler that return CtFieldModifier and TypeMethodDescriptionprivate CtField
Javac.compileField
(FieldDecl fd) protected CtField
MemberCodeGen.fieldAccess
(ASTree expr, boolean acceptLength) protected CtField
TypeChecker.fieldAccess
(ASTree expr) private CtField
TypeChecker.fieldAccess2
(Expr e, String jvmClassName) MemberResolver.lookupField
(String className, Symbol fieldName) MemberResolver.lookupFieldByJvmName
(String jvmClassName, Symbol fieldName) MemberResolver.lookupFieldByJvmName2
(String jvmClassName, Symbol fieldSym, ASTree expr) Only used by fieldAccess() in MemberCodeGen and TypeChecker.Methods in javassist.compiler with parameters of type CtFieldModifier and TypeMethodDescriptionprivate int
MemberCodeGen.addFieldrefInfo
(CtField f, FieldInfo finfo) private void
MemberCodeGen.atFieldAssignCore
(CtField f, boolean is_static, int fi, boolean is2byte) private int
MemberCodeGen.atFieldRead
(CtField f, boolean isStatic) Generates bytecode for reading a field value.private void
TypeChecker.atFieldRead
(CtField f) static ASTree
TypeChecker.getConstantFieldValue
(CtField f) private AccessorMaker
MemberCodeGen.isAccessibleField
(CtField f, FieldInfo finfo) Returns null if the field is accessible. -
Uses of CtField in javassist.compiler.ast
Fields in javassist.compiler.ast declared as CtFieldMethods in javassist.compiler.ast that return CtFieldMethods in javassist.compiler.ast with parameters of type CtField -
Uses of CtField in javassist.convert
Constructors in javassist.convert with parameters of type CtFieldModifierConstructorDescriptionTransformFieldAccess
(Transformer next, CtField field, String newClassname, String newFieldname) TransformReadField
(Transformer next, CtField field, String methodClassname, String methodName) TransformWriteField
(Transformer next, CtField field, String methodClassname, String methodName) -
Uses of CtField in javassist.expr
Methods in javassist.expr that return CtField