Package io.ran
Class MethodWriter
java.lang.Object
io.ran.MethodWriter
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddAnnotation(Clazz<?> annotation, boolean visibleAtRuntime) voidvoidvoidDefine a named entry on the registervoiddup()voidend()void<E extends Throwable>
 voidifElse(ThrowingConsumer<MethodWriter, E> t, ThrowingConsumer<MethodWriter, E> f) <E extends Throwable>
 voidifInstanceOf(Clazz<?> clazz, ThrowingConsumer<MethodWriter, E> i, ThrowingConsumer<MethodWriter, E> e) <E extends Throwable>
 void<E extends Throwable>
 void<E extends Throwable>
 void<E extends Throwable>
 voidifSame(ThrowingConsumer<MethodWriter, E> i, ThrowingConsumer<MethodWriter, E> e) <E extends Throwable>
 voidvoidinvoke(MethodSignature methodSignature) voidvoidinvokeSuper(MethodSignature methodSignature) voidiStore(int pos) voidload(int arg) voidvoidvoidnewInstance(Clazz<?> of) voidvoidobjectLoad(int pos) voidobjectStore(int pos) voidvoidpush(boolean b) voidvoidvoidvoidvoidvoidvoidvoidreturnPrimitive(Clazz<?> of) voidthrowException(Clazz<?> ex, ThrowingConsumer<MethodWriter, ReflectiveOperationException> messageGenerator) void
- 
Constructor Details- 
MethodWriterpublic MethodWriter(org.objectweb.asm.MethodVisitor mv, int parameterCount) 
 
- 
- 
Method Details- 
loadpublic void load(int arg) 
- 
load
- 
invoke
- 
invokeSuper
- 
invoke
- 
duppublic void dup()
- 
push
- 
pushpublic void push(boolean b) 
- 
push
- 
push
- 
ifNonNull- Throws:
- E extends Throwable
 
- 
ifNegateBoolean- Throws:
- E extends Throwable
 
- 
ifNull- Throws:
- E extends Throwable
 
- 
ifThen- Throws:
- E extends Throwable
 
- 
ifElsepublic <E extends Throwable> void ifElse(ThrowingConsumer<MethodWriter, E> t, ThrowingConsumer<MethodWriter, throws EE> f) - Throws:
- E extends Throwable
 
- 
ifSamepublic <E extends Throwable> void ifSame(ThrowingConsumer<MethodWriter, E> i, ThrowingConsumer<MethodWriter, throws EE> e) - Throws:
- E extends Throwable
 
- 
ifInstanceOfpublic <E extends Throwable> void ifInstanceOf(Clazz<?> clazz, ThrowingConsumer<MethodWriter, E> i, ThrowingConsumer<MethodWriter, throws EE> e) - Throws:
- E extends Throwable
 
- 
cast
- 
returnNothingpublic void returnNothing()
- 
load
- 
defineVarDefine a named entry on the registerThis will not affect the name in the generated code, but is used with load(String)to load the variable by name instead of by register position- Parameters:
- name- the name of the variable
- i- the position in the register
 
- 
objectVar
- 
objectStorepublic void objectStore(int pos) 
- 
iStorepublic void iStore(int pos) 
- 
objectLoadpublic void objectLoad(int pos) 
- 
nullConstpublic void nullConst()
- 
returnObjectpublic void returnObject()
- 
returnPrimitive
- 
returnOf
- 
endpublic void end()
- 
box
- 
unbox
- 
throwExceptionpublic void throwException(Clazz<?> ex, ThrowingConsumer<MethodWriter, ReflectiveOperationException> messageGenerator) 
- 
addAnnotation
- 
putField
- 
getField
- 
newInstance
 
-