Package io.quarkus.gizmo
Class EnumSwitchImpl<E extends Enum<E>>
java.lang.Object
io.quarkus.gizmo.BytecodeCreatorImpl
io.quarkus.gizmo.AbstractSwitch<E>
io.quarkus.gizmo.EnumSwitchImpl<E>
- All Implemented Interfaces:
BytecodeCreator,Switch<E>,Switch.EnumSwitch<E>,AutoCloseable
- Direct Known Subclasses:
ClassTransfromerMethodCreatorImpl.ClassTransformerEnumSwitchImpl
-
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.OperationNested classes/interfaces inherited from interface io.quarkus.gizmo.Switch
Switch.EnumSwitch<E extends Enum<E>>, Switch.StringSwitch -
Field Summary
FieldsFields inherited from class io.quarkus.gizmo.AbstractSwitch
defaultBlock, fallThroughFields inherited from class io.quarkus.gizmo.BytecodeCreatorImpl
MAX_STRING_LENGTH, operations -
Constructor Summary
ConstructorsConstructorDescriptionEnumSwitchImpl(ResultHandle value, Class<E> enumClass, BytecodeCreatorImpl enclosing) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddCaseBlock(E value, Consumer<BytecodeCreator> caseBlockConsumer) protected ResultHandlecallSwitchTableMethod(String methodName, Class<E> enumClass, MethodDescriptor enumOrdinal) voidcaseOf(E value, Consumer<BytecodeCreator> caseBlockConsumer) Adds a case block.voidcaseOf(List<E> values, Consumer<BytecodeCreator> caseBlockConsumer) Adds multiple case labels for a single block.(package private) voidfindActiveResultHandles(Set<ResultHandle> handlesToAllocate) private MethodCreatorImplfindMethodCreator(BytecodeCreatorImpl enclosing) protected final ResultHandlegenerateSwitchTable(Class<E> enumClass, BytecodeCreator bytecodeCreator, MethodDescriptor enumOrdinal) Methods inherited from class io.quarkus.gizmo.AbstractSwitch
defaultCase, doBreak, fallThroughMethods inherited from class io.quarkus.gizmo.BytecodeCreatorImpl
add, allocateLocalVariables, arrayLength, assign, bitwiseAnd, bitwiseOr, bitwiseXor, breakScope, checkCast, checkScope, checkScope, compareDouble, compareFloat, compareLong, continueScope, convertPrimitive, createFunction, createNewInstanceOp, createScope, createVariable, divide, enumSwitch, forEach, getBottom, getMethod, getMethodParam, getOwner, getThis, getTop, ifFalse, ifGreaterEqualZero, ifGreaterThanZero, ifIntegerEqual, ifIntegerGreaterEqual, ifIntegerGreaterThan, ifIntegerLessEqual, ifIntegerLessThan, ifLessEqualZero, ifLessThanZero, ifNonZero, ifNotNull, ifNull, ifReferencesEqual, ifReferencesNotEqual, ifThenElse, ifTrue, ifZero, instanceOf, invokeInterfaceMethod, invokeSpecialInterfaceMethod, invokeSpecialMethod, 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, 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, writeStaticFieldMethods inherited from interface io.quarkus.gizmo.Switch
defaultCase, doBreak, fallThrough
-
Field Details
-
ordinalToCaseBlocks
-
-
Constructor Details
-
EnumSwitchImpl
-
-
Method Details
-
caseOf
Description copied from interface:SwitchAdds a case block. -
caseOf
Description copied from interface:SwitchAdds multiple case labels for a single block. -
findActiveResultHandles
- Overrides:
findActiveResultHandlesin classBytecodeCreatorImpl
-
addCaseBlock
-
findMethodCreator
-
callSwitchTableMethod
protected ResultHandle callSwitchTableMethod(String methodName, Class<E> enumClass, MethodDescriptor enumOrdinal) -
generateSwitchTable
protected final ResultHandle generateSwitchTable(Class<E> enumClass, BytecodeCreator bytecodeCreator, MethodDescriptor enumOrdinal)
-