Package io.quarkus.gizmo
Class FunctionCreatorImpl.FunctionBytecodeCreator
java.lang.Object
io.quarkus.gizmo.BytecodeCreatorImpl
io.quarkus.gizmo.FunctionCreatorImpl.FunctionBytecodeCreator
- All Implemented Interfaces:
BytecodeCreator,AutoCloseable
- Enclosing class:
FunctionCreatorImpl
We need out own BytecodeCreator that captures all ResultHandles from the parent object that are passed in
These get transformed into local result handles, that are a read from a field
-
Nested Class Summary
Nested classes/interfaces inherited from class io.quarkus.gizmo.BytecodeCreatorImpl
BytecodeCreatorImpl.AssignOperation, BytecodeCreatorImpl.BlockOperation, BytecodeCreatorImpl.IfOperation, BytecodeCreatorImpl.InvokeOperation, BytecodeCreatorImpl.JumpOperation, BytecodeCreatorImpl.NewInstanceOperation, BytecodeCreatorImpl.Operation -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FunctionCreatorImplprivate final MethodCreatorImplFields inherited from class io.quarkus.gizmo.BytecodeCreatorImpl
MAX_STRING_LENGTH, operations -
Constructor Summary
ConstructorsConstructorDescriptionFunctionBytecodeCreator(FunctionCreatorImpl functionCreator, MethodCreatorImpl method) -
Method Summary
Modifier and TypeMethodDescriptionvoidbreakScope(BytecodeCreator scope) Go to the end of the given scope.voidcontinueScope(BytecodeCreator scope) Go to the top of the given scope.(package private) MethodCreatorImplinvokeSpecialInterfaceMethod(MethodDescriptor descriptor, ResultHandle object, ResultHandle... args) Invokes a special interface method, and returns aResultHandlewith the result, or null if the method is void.invokeSpecialMethod(MethodDescriptor descriptor, ResultHandle object, ResultHandle... args) Invokes a special method, and returns aResultHandlewith the result, or null if the method is void.private UnsupportedOperationException(package private) ResultHandle[]resolve(BytecodeCreator owner, ResultHandle... handle) (package private) ResultHandleresolve(ResultHandle handle, BytecodeCreator invoker) Turns a parent result handle into a local result handle.Methods inherited from class io.quarkus.gizmo.BytecodeCreatorImpl
add, allocateLocalVariables, arrayLength, assign, bitwiseAnd, bitwiseOr, bitwiseXor, checkCast, checkScope, checkScope, compareDouble, compareFloat, compareLong, convertPrimitive, createFunction, createNewInstanceOp, createScope, createVariable, divide, enumSwitch, findActiveResultHandles, forEach, getBottom, getMethodParam, getOwner, getThis, getTop, ifFalse, ifGreaterEqualZero, ifGreaterThanZero, ifIntegerEqual, ifIntegerGreaterEqual, ifIntegerGreaterThan, ifIntegerLessEqual, ifIntegerLessThan, ifLessEqualZero, ifLessThanZero, ifNonZero, ifNotNull, ifNull, ifReferencesEqual, ifReferencesNotEqual, ifThenElse, ifTrue, ifZero, instanceOf, invokeInterfaceMethod, invokeStaticInterfaceMethod, invokeStaticMethod, invokeVirtualMethod, isScopedWithin, jumpTo, load, load, load, load, load, load, load, load, load, loadClass, loadClassFromTCCL, loadNull, loadResultHandle, loadResultHandle, multiply, newArray, newInstance, readArrayValue, readInstanceField, readStaticField, remainder, resolve, resolve, returnValue, storeResultHandle, stringSwitch, subtract, throwException, tryBlock, whileLoop, writeArrayValue, writeInstanceField, writeInteriorOperations, writeOperations, writeStaticFieldMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.gizmo.BytecodeCreator
breakScope, checkCast, close, continueScope, createVariable, increment, instanceOf, invokeInterfaceMethod, invokeSpecialInterfaceMethod, invokeSpecialMethod, invokeStaticInterfaceMethod, invokeStaticMethod, invokeVirtualMethod, load, loadClass, loadClass, loadClassFromTCCL, loadClassFromTCCL, marshalAsArray, newArray, newArray, newArray, newInstance, readArrayValue, readInstanceField, readStaticField, returnBoolean, returnInt, returnNull, returnVoid, throwException, throwException, writeArrayValue, writeInstanceField, writeStaticField
-
Field Details
-
functionCreator
-
method
-
-
Constructor Details
-
FunctionBytecodeCreator
FunctionBytecodeCreator(FunctionCreatorImpl functionCreator, MethodCreatorImpl method)
-
-
Method Details
-
resolve
Turns a parent result handle into a local result handle.This is done by storing them in fields on the object, and having them be passed into the constructor
- Overrides:
resolvein classBytecodeCreatorImpl- Parameters:
handle- The handle that may be a parent handle- Returns:
- The substituted handler
-
resolve
- Overrides:
resolvein classBytecodeCreatorImpl
-
getMethod
MethodCreatorImpl getMethod()- Overrides:
getMethodin classBytecodeCreatorImpl
-
invokeSpecialMethod
public ResultHandle invokeSpecialMethod(MethodDescriptor descriptor, ResultHandle object, ResultHandle... args) Description copied from interface:BytecodeCreatorInvokes a special method, and returns aResultHandlewith the result, or null if the method is void.Special methods are constructor invocations, or invocations on a superclass method of the current class.
- Specified by:
invokeSpecialMethodin interfaceBytecodeCreator- Overrides:
invokeSpecialMethodin classBytecodeCreatorImpl- Parameters:
descriptor- The method descriptorobject- AResultHandlerepresenting the object to invoke onargs- The method parameters- Returns:
- The method result, or null if a void method
-
invokeSpecialInterfaceMethod
public ResultHandle invokeSpecialInterfaceMethod(MethodDescriptor descriptor, ResultHandle object, ResultHandle... args) Description copied from interface:BytecodeCreatorInvokes a special interface method, and returns aResultHandlewith the result, or null if the method is void.Special interface method invocations are invocations of a superinterface method of the current class.
- Specified by:
invokeSpecialInterfaceMethodin interfaceBytecodeCreator- Overrides:
invokeSpecialInterfaceMethodin classBytecodeCreatorImpl- Parameters:
descriptor- The method descriptorobject- AResultHandlerepresenting the object to invoke onargs- The method parameters- Returns:
- The method result, or null if a void method
-
continueScope
Description copied from interface:BytecodeCreatorGo to the top of the given scope.- Specified by:
continueScopein interfaceBytecodeCreator- Overrides:
continueScopein classBytecodeCreatorImpl- Parameters:
scope- the scope to continue
-
breakScope
Description copied from interface:BytecodeCreatorGo to the end of the given scope.- Specified by:
breakScopein interfaceBytecodeCreator- Overrides:
breakScopein classBytecodeCreatorImpl- Parameters:
scope- the scope to break out of
-
nonLocalReturn
-