Package xyz.cofe.trambda
Class MethodRestore
- java.lang.Object
-
- xyz.cofe.trambda.MethodRestore
-
public class MethodRestore extends Object
Генерация байт-кода класса из представленияMethodDefvar byteCode = new MethodRestore() // Имя целевого класса .className("xyz.cofe.trambda.buildMethodTest.Build1") // Имя целевого метода .methodName("lambda1") // Сериализованная лямбда .methodDef(mdef) // Генерация байт кода .generate();- See Also:
MethodDump,MethodDef,AsmQuery
-
-
Field Summary
Fields Modifier and Type Field Description protected StringbinClassNameprotected org.objectweb.asm.ClassWritercwprotected Map<String,org.objectweb.asm.Label>labelsprotected org.objectweb.asm.MethodVisitormvprotected Map<String,String>targetHandlesprotected Map<String,MethodDef>targetMethodDef
-
Constructor Summary
Constructors Constructor Description MethodRestore()Конструктор по умолчаниюMethodRestore(MethodRestore sample)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbuild(Code code)protected Objectbuild(DoubleArg arg)protected voidbuild(End end)protected voidbuild(FieldInsn fld)protected Objectbuild(FloatArg arg)protected voidbuild(Frame f)protected Objectbuild(HandleArg arg)protected voidbuild(IincInsn ii)protected voidbuild(Insn insn)protected Objectbuild(IntArg arg)protected voidbuild(IntInsn ii)protected voidbuild(InvokeDynamicInsn idi)protected voidbuild(JumpInsn j)protected voidbuild(Label lbl)protected voidbuild(LdcInsn ldc)protected voidbuild(LineNumber ln)protected voidbuild(LocalVariable lv)protected Objectbuild(LongArg arg)protected voidbuild(LookupSwitchInsn lsw)protected voidbuild(Maxs m)protected voidbuild(MethodInsn mi)protected voidbuild(MultiANewArrayInsn ii)protected Objectbuild(StringArg arg)protected voidbuild(TableSwitchInsn tsw)protected voidbuild(TryCatchBlock tcb)protected Objectbuild(TypeArg arg)protected voidbuild(TypeInsn tinst)protected voidbuild(VarInsn insn)protected voidbuildConstructor()protected voidbuildMethod()protected voidbuildMethod(int acc, String name, String desc, String sign, String[] excepts, List<ByteCode> byteCodes)MethodRestoreclassName(String name)MethodRestoreclone()byte[]generate()StringgetClassName()MethodDefgetMethodDef()StringgetMethodName()MethodRestoremethodDef(MethodDef mdef)MethodRestoremethodName(String mname)voidsetClassName(String className)voidsetMethodDef(MethodDef mdef)voidsetMethodName(String mname)
-
-
-
Field Detail
-
cw
protected transient org.objectweb.asm.ClassWriter cw
-
mv
protected transient org.objectweb.asm.MethodVisitor mv
-
binClassName
protected transient String binClassName
-
-
Constructor Detail
-
MethodRestore
public MethodRestore()
Конструктор по умолчанию
-
MethodRestore
public MethodRestore(MethodRestore sample)
-
-
Method Detail
-
clone
public MethodRestore clone()
-
getClassName
public String getClassName()
-
setClassName
public void setClassName(String className)
-
className
public MethodRestore className(String name)
-
getMethodDef
public MethodDef getMethodDef()
-
setMethodDef
public void setMethodDef(MethodDef mdef)
-
methodDef
public MethodRestore methodDef(MethodDef mdef)
-
getMethodName
public String getMethodName()
-
setMethodName
public void setMethodName(String mname)
-
methodName
public MethodRestore methodName(String mname)
-
generate
public byte[] generate()
-
buildConstructor
protected void buildConstructor()
-
buildMethod
protected void buildMethod()
-
buildMethod
protected void buildMethod(int acc, String name, String desc, String sign, String[] excepts, List<ByteCode> byteCodes)
-
build
protected void build(Code code)
-
build
protected void build(End end)
-
build
protected void build(TypeInsn tinst)
-
build
protected void build(Label lbl)
-
build
protected void build(LineNumber ln)
-
build
protected void build(VarInsn insn)
-
build
protected void build(InvokeDynamicInsn idi)
-
build
protected void build(Insn insn)
-
build
protected void build(LocalVariable lv)
-
build
protected void build(Maxs m)
-
build
protected void build(Frame f)
-
build
protected void build(JumpInsn j)
-
build
protected void build(MethodInsn mi)
-
build
protected void build(IntInsn ii)
-
build
protected void build(LdcInsn ldc)
-
build
protected void build(FieldInsn fld)
-
build
protected void build(IincInsn ii)
-
build
protected void build(TryCatchBlock tcb)
-
build
protected void build(MultiANewArrayInsn ii)
-
build
protected void build(LookupSwitchInsn lsw)
-
build
protected void build(TableSwitchInsn tsw)
-
-