Package ghidra.pcode.emu.jit.gen.util
Interface Fld
public interface Fld
Utilities for declaring fields in an ASM
ClassVisitor
LATER: We do not yet return a "field handle." Ideally, we would and that would be the required
argument for Op.getfield(Emitter, TRef, String, BNonVoid) and related ops.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T> voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, Types.SNonVoid type, String name) Declare an uninitialized field of any typestatic voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TBool type, String name, boolean init) Declare an initialized boolean fieldstatic voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TByte type, String name, byte init) Declare an initialized byte fieldstatic voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TDouble type, String name, double init) Declare an initialized double fieldstatic voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TFloat type, String name, float init) Declare an initialized float fieldstatic voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TInt type, String name, int init) Declare an initialized int fieldstatic voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TLong type, String name, long init) Declare an initialized long fieldstatic <T> voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TRef<T> type, String name, T init) Declare an initialized reference fieldstatic voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TShort type, String name, short init) Declare an initialized short fieldstatic <T> voiddecl(org.objectweb.asm.ClassVisitor cv, int flags, org.apache.commons.lang3.reflect.TypeLiteral<T> type, String name) Declare an uninitialized field of any type with a type signature
-
Method Details
-
decl
static void decl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TBool type, String name, boolean init) Declare an initialized boolean field- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the typename- the nameinit- the initial value
-
decl
static void decl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TByte type, String name, byte init) Declare an initialized byte field- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the typename- the nameinit- the initial value
-
decl
static void decl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TShort type, String name, short init) Declare an initialized short field- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the typename- the nameinit- the initial value
-
decl
static void decl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TInt type, String name, int init) Declare an initialized int field- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the typename- the nameinit- the initial value
-
decl
static void decl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TLong type, String name, long init) Declare an initialized long field- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the typename- the nameinit- the initial value
-
decl
static void decl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TFloat type, String name, float init) Declare an initialized float field- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the typename- the nameinit- the initial value
-
decl
static void decl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TDouble type, String name, double init) Declare an initialized double field- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the typename- the nameinit- the initial value
-
decl
static <T> void decl(org.objectweb.asm.ClassVisitor cv, int flags, Types.TRef<T> type, String name, T init) Declare an initialized reference fieldNote that only certain types of fields can have initial values specified in this manner. A
Stringis one such type. For other types, the initializer must be provided in a generated class initializer (for static fields) or constructor (for instance fields).- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the typename- the nameinit- the initial value
-
decl
static <T> void decl(org.objectweb.asm.ClassVisitor cv, int flags, Types.SNonVoid type, String name) Declare an uninitialized field of any type- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the typename- the name
-
decl
static <T> void decl(org.objectweb.asm.ClassVisitor cv, int flags, org.apache.commons.lang3.reflect.TypeLiteral<T> type, String name) Declare an uninitialized field of any type with a type signature- Parameters:
cv- the class visitorflags- the flags as inClassVisitor.visitField(int, String, String, String, Object)type- the type with signaturename- the name
-