Package io.airlift.bytecode
Class BytecodeBlock
java.lang.Object
io.airlift.bytecode.BytecodeBlock
- All Implemented Interfaces:
BytecodeNode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(BytecodeNode parent, BytecodeVisitor<T> visitor) voidaccept(org.objectweb.asm.MethodVisitor visitor, MethodGenerationContext generationContext) append(BytecodeNode node) checkCast(ParameterizedType type) Compare two doubles.Compare two doubles.dup()getField(FieldDefinition field) getField(ParameterizedType target, String fieldName, ParameterizedType fieldType) getStaticField(FieldDefinition field) getStaticField(ParameterizedType target, FieldDefinition field) getStaticField(ParameterizedType target, String fieldName, ParameterizedType fieldType) getStaticField(Class<?> target, String fieldName, Class<?> fieldType) getStaticField(Field field) getVariable(Variable variable) ifFalseGoto(LabelNode label) ifNotNullGoto(LabelNode label) ifNotZeroGoto(LabelNode label) ifNullGoto(LabelNode label) ifTrueGoto(LabelNode label) ifZeroGoto(LabelNode label) incrementVariable(Variable variable, byte increment) initializeVariable(Variable variable) intAdd()intBitOr()invokeConstructor(ParameterizedType type, ParameterizedType... parameterTypes) invokeConstructor(ParameterizedType type, Iterable<ParameterizedType> parameterTypes) invokeConstructor(Class<?> type, Class<?>... parameterTypes) invokeConstructor(Class<?> type, Iterable<Class<?>> parameterTypes) invokeConstructor(Constructor<?> constructor) invokeDynamic(String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes, Method bootstrapMethod, List<Object> bootstrapArgs) invokeDynamic(String name, MethodType methodType, Method bootstrapMethod, Object... defaultBootstrapArguments) invokeInterface(MethodDefinition method) invokeInterface(ParameterizedType type, String name, ParameterizedType returnType, ParameterizedType... parameterTypes) invokeInterface(ParameterizedType type, String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes) invokeInterface(Class<?> type, String name, Class<?> returnType, Class<?>... parameterTypes) invokeInterface(Method method) invokeSpecial(MethodDefinition method) invokeSpecial(ParameterizedType type, String name, ParameterizedType returnType, ParameterizedType... parameterTypes) invokeSpecial(ParameterizedType type, String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes) invokeSpecial(Class<?> type, String name, Class<?> returnType, Class<?>... parameterTypes) invokeSpecial(Method method) invokeStatic(MethodDefinition method) invokeStatic(ParameterizedType type, String name, ParameterizedType returnType, ParameterizedType... parameterTypes) invokeStatic(ParameterizedType type, String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes) invokeStatic(Class<?> type, String name, Class<?> returnType, Class<?>... parameterTypes) invokeStatic(Method method) invokeVirtual(MethodDefinition method) invokeVirtual(ParameterizedType type, String name, ParameterizedType returnType, ParameterizedType... parameterTypes) invokeVirtual(ParameterizedType type, String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes) invokeVirtual(Class<?> type, String name, Class<?> returnType, Class<?>... parameterTypes) invokeVirtual(Method method) booleanisEmpty()isInstanceOf(Class<?> type) longAdd()newObject(ParameterizedType type) pop()pop(ParameterizedType type) push(boolean value) push(int value) push(ParameterizedType type) pushJavaDefault(Class<?> type) pushNull()putField(FieldDefinition field) putField(ParameterizedType target, String fieldName, ParameterizedType fieldType) putStaticField(FieldDefinition field) putStaticField(ParameterizedType target, FieldDefinition field) putStaticField(ParameterizedType target, String fieldName, ParameterizedType fieldType) putVariable(Variable variable) putVariable(Variable variable, boolean value) putVariable(Variable variable, int value) putVariable(Variable variable, ParameterizedType type) putVariable(Variable variable, Class<?> type) putVariable(Variable variable, Number value) putVariable(Variable variable, String value) ret()retFloat()retInt()retLong()setDescription(String description) swap()visitLabel(LabelNode label) visitLineNumber(int currentLineNumber)
-
Constructor Details
-
BytecodeBlock
public BytecodeBlock()
-
-
Method Details
-
getDescription
-
setDescription
-
getChildNodes
- Specified by:
getChildNodesin interfaceBytecodeNode
-
append
-
comment
-
comment
-
isEmpty
public boolean isEmpty() -
visitLabel
-
gotoLabel
-
ifFalseGoto
-
ifTrueGoto
-
ifZeroGoto
-
ifNotZeroGoto
-
ifNullGoto
-
ifNotNullGoto
-
intAdd
-
longAdd
-
longCompare
-
doubleCompareNanLess
Compare two doubles. If either is NaN comparison is -1. -
doubleCompareNanGreater
Compare two doubles. If either is NaN comparison is 1. -
intLeftShift
-
intRightShift
-
longLeftShift
-
longRightShift
-
unsignedIntRightShift
-
unsignedLongRightShift
-
intBitAnd
-
intBitOr
-
intBitXor
-
longBitAnd
-
longBitOr
-
longBitXor
-
intNegate
-
intToLong
-
longNegate
-
longToInt
-
isInstanceOf
-
isInstanceOf
-
checkCast
-
checkCast
-
invokeStatic
-
invokeStatic
-
invokeStatic
public BytecodeBlock invokeStatic(Class<?> type, String name, Class<?> returnType, Class<?>... parameterTypes) -
invokeStatic
-
invokeStatic
public BytecodeBlock invokeStatic(ParameterizedType type, String name, ParameterizedType returnType, ParameterizedType... parameterTypes) -
invokeStatic
public BytecodeBlock invokeStatic(ParameterizedType type, String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes) -
invokeVirtual
-
invokeVirtual
-
invokeVirtual
public BytecodeBlock invokeVirtual(Class<?> type, String name, Class<?> returnType, Class<?>... parameterTypes) -
invokeVirtual
-
invokeVirtual
public BytecodeBlock invokeVirtual(ParameterizedType type, String name, ParameterizedType returnType, ParameterizedType... parameterTypes) -
invokeVirtual
public BytecodeBlock invokeVirtual(ParameterizedType type, String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes) -
invokeInterface
-
invokeInterface
-
invokeInterface
public BytecodeBlock invokeInterface(Class<?> type, String name, Class<?> returnType, Class<?>... parameterTypes) -
invokeInterface
-
invokeInterface
public BytecodeBlock invokeInterface(ParameterizedType type, String name, ParameterizedType returnType, ParameterizedType... parameterTypes) -
invokeInterface
public BytecodeBlock invokeInterface(ParameterizedType type, String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes) -
invokeConstructor
-
invokeConstructor
-
invokeConstructor
-
invokeConstructor
-
invokeConstructor
public BytecodeBlock invokeConstructor(ParameterizedType type, Iterable<ParameterizedType> parameterTypes) -
invokeSpecial
-
invokeSpecial
-
invokeSpecial
public BytecodeBlock invokeSpecial(Class<?> type, String name, Class<?> returnType, Class<?>... parameterTypes) -
invokeSpecial
-
invokeSpecial
public BytecodeBlock invokeSpecial(ParameterizedType type, String name, ParameterizedType returnType, ParameterizedType... parameterTypes) -
invokeSpecial
public BytecodeBlock invokeSpecial(ParameterizedType type, String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes) -
invokeDynamic
public BytecodeBlock invokeDynamic(String name, MethodType methodType, Method bootstrapMethod, Object... defaultBootstrapArguments) -
invokeDynamic
public BytecodeNode invokeDynamic(String name, ParameterizedType returnType, Iterable<ParameterizedType> parameterTypes, Method bootstrapMethod, List<Object> bootstrapArgs) -
ret
-
ret
-
retObject
-
retFloat
-
retDouble
-
retBoolean
-
retLong
-
retInt
-
throwObject
-
newObject
-
newObject
-
newArray
-
dup
-
dup
-
pop
-
pop
-
pop
-
swap
-
getField
-
getField
-
getField
-
getField
public BytecodeBlock getField(ParameterizedType target, String fieldName, ParameterizedType fieldType) -
putField
-
putField
-
putField
-
putField
public BytecodeBlock putField(ParameterizedType target, String fieldName, ParameterizedType fieldType) -
getStaticField
-
getStaticField
-
getStaticField
-
getStaticField
public BytecodeBlock getStaticField(ParameterizedType target, String fieldName, ParameterizedType fieldType) -
getStaticField
-
putStaticField
-
putStaticField
-
putStaticField
public BytecodeBlock putStaticField(ParameterizedType target, String fieldName, ParameterizedType fieldType) -
pushNull
-
push
-
push
-
push
-
push
-
push
-
push
-
pushJavaDefault
-
initializeVariable
-
getVariable
-
putVariable
-
putVariable
-
putVariable
-
putVariable
-
putVariable
-
putVariable
-
putVariable
-
incrementVariable
-
getObjectArrayElement
-
putObjectArrayElement
-
getIntArrayElement
-
putIntArrayElement
-
visitLineNumber
-
accept
public void accept(org.objectweb.asm.MethodVisitor visitor, MethodGenerationContext generationContext) - Specified by:
acceptin interfaceBytecodeNode
-
accept
- Specified by:
acceptin interfaceBytecodeNode
-