Uses of Interface
java.lang.classfile.Label
Packages that use Label
Package
Description
Provides classfile parsing, generation, and transformation library.
Provides interfaces describing classfile attributes for the
java.lang.classfile
library.Provides specific components, transformations, and tools built on top of the
java.lang.classfile
library.Provides interfaces describing code instructions for the
java.lang.classfile
library.-
Uses of Label in java.lang.classfile
Methods in java.lang.classfile that return LabelModifier and TypeMethodDescriptionCodeBuilder.BlockCodeBuilder.breakLabel()
Returns the label locating where control is passed back to the parent block..CodeBuilder.endLabel()
Returns the label associated with the end of the current block.TypeAnnotation.LocalVarTargetInfo.endLabel()
The given local variable has a value at indices into the code array in the interval [start_pc, start_pc + length), that is, between start_pc inclusive and start_pc + length exclusive.default Label
CodeBuilder.newBoundLabel()
Create new label bound with current positionCodeBuilder.newLabel()
Returns a fresh unbound label.CodeBuilder.startLabel()
Returns the label associated with the beginning of the current block.TypeAnnotation.LocalVarTargetInfo.startLabel()
The given local variable has a value at indices into the code array in the interval [start_pc, start_pc + length), that is, between start_pc inclusive and start_pc + length exclusive.TypeAnnotation.OffsetTarget.target()
The code array offset of either the bytecode instruction corresponding to the instanceof expression, the new bytecode instruction corresponding to the new expression, or the bytecode instruction corresponding to the method reference expression.TypeAnnotation.TypeArgumentTarget.target()
The code array offset of either the bytecode instruction corresponding to the cast expression, the new bytecode instruction corresponding to the new expression, the bytecode instruction corresponding to the explicit constructor invocation statement, the bytecode instruction corresponding to the method invocation expression, or the bytecode instruction corresponding to the method reference expression.Methods in java.lang.classfile with parameters of type LabelModifier and TypeMethodDescriptiondefault CodeBuilder
Generate a branch instructiondefault CodeBuilder
CodeBuilder.characterRange
(Label startScope, Label endScope, int characterRangeStart, int characterRangeEnd, int flags) Declare a character range entrydefault CodeBuilder
CodeBuilder.exceptionCatch
(Label start, Label end, Label handler, ClassEntry catchType) Declare an exception table entrydefault CodeBuilder
CodeBuilder.exceptionCatch
(Label start, Label end, Label handler, ClassDesc catchType) Declare an exception table entrydefault CodeBuilder
CodeBuilder.exceptionCatch
(Label start, Label end, Label handler, Optional<ClassEntry> catchType) Declare an exception table entrydefault CodeBuilder
CodeBuilder.exceptionCatchAll
(Label start, Label end, Label handler) Declare an exception table entry catching all exceptions and errorsdefault CodeBuilder
Generate an instruction to branch alwaysdefault CodeBuilder
Generate an instruction to branch always with wide indexdefault CodeBuilder
Generate an instruction to branch if reference comparison succeedsdefault CodeBuilder
Generate an instruction to branch if reference comparison succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilder
Generate an instruction to branch if int comparison with zero succeedsdefault CodeBuilder
Generate an instruction to branch if reference is not nulldefault CodeBuilder
Generate an instruction to branch if reference is nulldefault CodeBuilder
CodeBuilder.labelBinding
(Label label) Bind label with current positiondefault CodeBuilder
CodeBuilder.localVariable
(int slot, Utf8Entry nameEntry, Utf8Entry descriptorEntry, Label startScope, Label endScope) Declare a local variable entrydefault CodeBuilder
CodeBuilder.localVariable
(int slot, String name, ClassDesc descriptor, Label startScope, Label endScope) Declare a local variable entrydefault CodeBuilder
CodeBuilder.localVariableType
(int slot, Utf8Entry nameEntry, Utf8Entry signatureEntry, Label startScope, Label endScope) Declare a local variable type entrydefault CodeBuilder
CodeBuilder.localVariableType
(int slot, String name, Signature signature, Label startScope, Label endScope) Declare a local variable type entrydefault CodeBuilder
CodeBuilder.lookupswitch
(Label defaultTarget, List<SwitchCase> cases) Generate an instruction to access a jump table by key match and jumpReturns local variable target info.TypeAnnotation.TargetInfo.ofCastExpr
(Label target, int typeArgumentIndex) Returns a target for annotations on the i'th type in a cast expression.TypeAnnotation.TargetInfo.ofConstructorInvocationTypeArgument
(Label target, int typeArgumentIndex) Returns a target for annotations on the i'th type argument in the explicit type argument list for an explicit constructor invocation statement.static TypeAnnotation.OffsetTarget
TypeAnnotation.TargetInfo.ofConstructorReference
(Label target) Returns a target for annotations on the type before the :: in a constructor reference expression.TypeAnnotation.TargetInfo.ofConstructorReferenceTypeArgument
(Label target, int typeArgumentIndex) Returns a target for annotations on the i'th type argument in the explicit type argument list for a new expression.static TypeAnnotation.OffsetTarget
TypeAnnotation.TargetInfo.ofInstanceofExpr
(Label target) Returns a target for annotations on the type in an instanceof expression.TypeAnnotation.TargetInfo.ofMethodInvocationTypeArgument
(Label target, int typeArgumentIndex) Returns a target for annotations on the i'th type argument in the explicit type argument list for a method invocation expression.static TypeAnnotation.OffsetTarget
TypeAnnotation.TargetInfo.ofMethodReference
(Label target) Returns a target for annotations on the type before the :: in a method reference expression.TypeAnnotation.TargetInfo.ofMethodReferenceTypeArgument
(Label target, int typeArgumentIndex) Returns a target for annotations on the i'th type argument in the explicit type argument list for a method reference expression.static TypeAnnotation.OffsetTarget
Returns a target for annotations on the type in a new expression.static TypeAnnotation.OffsetTarget
TypeAnnotation.TargetInfo.ofOffset
(TypeAnnotation.TargetType targetType, Label target) Returns a target for annotations on the type in an instanceof expression or a new expression, or the type before the :: in a method reference expression.TypeAnnotation.TargetInfo.ofTypeArgument
(TypeAnnotation.TargetType targetType, Label target, int typeArgumentIndex) Returns a target for annotations on the i'th type in a cast expression, or on the i'th type argument in the explicit type argument list for any of the following: a new expression, an explicit constructor invocation statement, a method invocation expression, or a method reference expression.default CodeBuilder
CodeBuilder.tableswitch
(int low, int high, Label defaultTarget, List<SwitchCase> cases) Generate an instruction to access a jump table by index and jumpdefault CodeBuilder
CodeBuilder.tableswitch
(Label defaultTarget, List<SwitchCase> cases) Generate an instruction to access a jump table by index and jump -
Uses of Label in java.lang.classfile.attribute
Methods in java.lang.classfile.attribute that return LabelModifier and TypeMethodDescriptionStackMapFrameInfo.UninitializedVerificationTypeInfo.newTarget()
Returns thenew
instruction position that creates this unitialized object.StackMapFrameInfo.target()
Returns the frame target label.Methods in java.lang.classfile.attribute with parameters of type LabelModifier and TypeMethodDescriptionint
CodeAttribute.labelToBci
(Label label) Returns the position of thelabel
in thecodeArray
.static StackMapFrameInfo
StackMapFrameInfo.of
(Label target, List<StackMapFrameInfo.VerificationTypeInfo> locals, List<StackMapFrameInfo.VerificationTypeInfo> stack) Returns a new stack map frame.Returns an unitialized verification type info. -
Uses of Label in java.lang.classfile.components
Method parameters in java.lang.classfile.components with type arguments of type LabelModifier and TypeMethodDescriptionstatic CodeRelabeler
CodeRelabeler.of
(BiFunction<Label, CodeBuilder, Label> mapFunction) Creates a new instance of CodeRelabeler using providedBiFunction
to re-label the code.static CodeRelabeler
CodeRelabeler.of
(BiFunction<Label, CodeBuilder, Label> mapFunction) Creates a new instance of CodeRelabeler using providedBiFunction
to re-label the code.static CodeRelabeler
Creates a new instance of CodeRelabeler storing the label mapping into the provided map.static CodeRelabeler
Creates a new instance of CodeRelabeler storing the label mapping into the provided map. -
Uses of Label in java.lang.classfile.instruction
Methods in java.lang.classfile.instruction that return LabelModifier and TypeMethodDescriptionLookupSwitchInstruction.defaultTarget()
Returns the target of the default case.TableSwitchInstruction.defaultTarget()
Returns the default target of the switch.CharacterRange.endScope()
Returns the end of the instruction range.LocalVariable.endScope()
Returns the end range of the local variable scope.LocalVariableType.endScope()
Returns the end range of the local variable scope.ExceptionCatch.handler()
Returns the handler for the exception.LabelTarget.label()
Returns the label corresponding to this target.CharacterRange.startScope()
Returns the start of the instruction range.LocalVariable.startScope()
Returns the start range of the local variable scope.LocalVariableType.startScope()
Returns the start range of the local variable scope.BranchInstruction.target()
Returns the target of the branch.DiscontinuedInstruction.JsrInstruction.target()
Returns the target of the JSR instruction.SwitchCase.target()
Returns the branch target corresponding to this case.ExceptionCatch.tryEnd()
Returns the end of the instruction range for the guarded instructions.ExceptionCatch.tryStart()
Returns the beginning of the instruction range for the guarded instructions.Methods in java.lang.classfile.instruction with parameters of type LabelModifier and TypeMethodDescriptionstatic BranchInstruction
Returns a branch instruction.static CharacterRange
CharacterRange.of
(Label startScope, Label endScope, int characterRangeStart, int characterRangeEnd, int flags) Returns a character range pseudo-instruction.Returns a JSR instruction.Returns a JSR instruction.static ExceptionCatch
Returns an exception table pseudo-instruction for an unconditional handler.static ExceptionCatch
Returns an exception table pseudo-instruction.static LocalVariable
LocalVariable.of
(int slot, Utf8Entry nameEntry, Utf8Entry descriptorEntry, Label startScope, Label endScope) Returns a local variable pseudo-instruction.static LocalVariable
Returns a local variable pseudo-instruction.static LocalVariableType
LocalVariableType.of
(int slot, Utf8Entry nameEntry, Utf8Entry signatureEntry, Label startScope, Label endScope) Returns a local variable type pseudo-instruction.static LocalVariableType
Returns a local variable type pseudo-instruction.static LookupSwitchInstruction
LookupSwitchInstruction.of
(Label defaultTarget, List<SwitchCase> cases) Returns a lookup switch instruction.static SwitchCase
Create a SwitchCasestatic TableSwitchInstruction
TableSwitchInstruction.of
(int lowValue, int highValue, Label defaultTarget, List<SwitchCase> cases) Returns a table switch instruction.