Preview API
Show preview API for:
Contents
-
PackagePreview FeatureDescriptionClassFile APIProvides classfile parsing, generation, and transformation library.ClassFile APIProvides interfaces describing classfile attributes for the
java.lang.classfile
PREVIEW library.ClassFile APIProvides specific components, transformations, and tools built on top of thejava.lang.classfile
PREVIEW library.ClassFile APIProvides interfaces describing classfile constant pool entries for thejava.lang.classfile
PREVIEW library.ClassFile APIProvides interfaces describing code instructions for thejava.lang.classfile
PREVIEW library.
-
InterfacePreview FeatureDescriptionString TemplatesA tree node for a string template expression.ClassFile APIModels the access flags for a class, method, or field.ClassFile APIModels an annotation on a declaration.ClassFile APIModels a key-value pair of an annotation.ClassFile APIModels the value of a key-value pair of an annotation.ClassFile APIModels an annotation-valued elementClassFile APIModels an array-valued elementClassFile APIModels a constant-valued elementClassFile APIModels a constant-valued elementClassFile APIModels a constant-valued elementClassFile APIModels a class-valued elementClassFile APIModels a constant-valued elementClassFile APIModels a constant-valued elementClassFile APIModels an enum-valued elementClassFile APIModels a constant-valued elementClassFile APIModels a constant-valued elementClassFile APIModels a constant-valued elementClassFile APIModels a constant-valued elementClassFile APIModels a constant-valued elementClassFile APIModels a classfile attribute 4.7.ClassFile APIClassFile APIModels the
BootstrapMethods
attribute 4.7.23, which serves as an extension to the constant pool of a classfile.ClassFile APIModels a single character range in theCharacterRangeTableAttribute
PREVIEW.ClassFile APIThe CharacterRangeTable attribute is an optional variable-length attribute in the attributes table of aCode
attribute.ClassFile APIModels theCode
attribute 4.7.3, appears on non-native, non-abstract methods and contains the bytecode of the method body.ClassFile APIModels theCompilationID
attribute (@@@ need reference), which can appear on classes and records the compilation time of the class.ClassFile APIModels theConstantValue
attribute 4.7.2, which can appear on fields and indicates that the field's value is a constant.ClassFile APIModels theDeprecated
attribute 4.7.15, which can appear on classes, methods, and fields.ClassFile APIModels theEnclosingMethod
attribute 4.7.7, which can appear on classes, and indicates that the class is a local or anonymous class.ClassFile APIModels theExceptions
attribute 4.7.5, which can appear on methods, and records the exceptions declared to be thrown by this method.ClassFile APIModels theInnerClasses
attribute 4.7.6, which can appear on classes, and records which classes referenced by this classfile are inner classes.ClassFile APIModels a single inner class in theInnerClassesAttribute
PREVIEW.ClassFile APIModels a single line number in theLineNumberTableAttribute
PREVIEW.ClassFile APIModels theLineNumberTable
attribute 4.7.12, which can appear on aCode
attribute, and records the mapping between indexes into the code table and line numbers in the source file.ClassFile APIModels a single local variable in theLocalVariableTableAttribute
PREVIEW.ClassFile APIModels theLocalVariableTable
attribute 4.7.13, which can appear on aCode
attribute, and records debug information about local variables.ClassFile APIModels a single local variable in theLocalVariableTypeTableAttribute
PREVIEW.ClassFile APIModels theLocalVariableTypeTable
attribute 4.7.14, which can appear on aCode
attribute, and records debug information about local variables.ClassFile APIModels a single method parameter in theMethodParametersAttribute
PREVIEW.ClassFile APIModels theMethodParameters
attribute 4.7.24, which can appear on methods, and records optional information about the method's parameters.ClassFile APIModels theModule
attribute 4.7.25, which can appear on classes that represent module descriptors.ClassFile APIA builder for module attributes.ClassFile APIModels a single "exports" declaration in theModuleAttribute
PREVIEW.ClassFile APIModels theModuleHashes
attribute, which can appear on classes that represent module descriptors.ClassFile APIModels hash information for a single module in theModuleHashesAttribute
PREVIEW.ClassFile APIModels theModuleMainClass
attribute 4.7.27, which can appear on classes that represent module descriptors.ClassFile APIModels a single "opens" declaration in theModuleAttribute
PREVIEW.ClassFile APIModels theModulePackages
attribute 4.7.26, which can appear on classes that represent module descriptors.ClassFile APIModels a single "provides" declaration in theModuleAttribute
PREVIEW.ClassFile APIModels a single "requires" declaration in theModuleAttribute
PREVIEW.ClassFile APIModels theModuleResolution
attribute, which can appear on classes that represent module descriptors.ClassFile APIModels theModuleTarget
attribute, which can appear on classes that represent module descriptors.ClassFile APIModels theNestHost
attribute 4.7.28, which can appear on classes to indicate that this class is a member of a nest.ClassFile APIModels theNestMembers
attribute 4.7.29, which can appear on classes to indicate that this class is the host of a nest.ClassFile APIModels thePermittedSubclasses
attribute 4.7.31, which can appear on classes to indicate which classes may extend this class.ClassFile APIModels theRecord
attribute 4.7.30, which can appear on classes to indicate that this class is a record class.ClassFile APIModels a single record component in theRecordAttribute
PREVIEW.ClassFile APIModels theRuntimeInvisibleAnnotations
attribute 4.7.17, which can appear on classes, methods, and fields.ClassFile APIModels theRuntimeInvisibleParameterAnnotations
attribute 4.7.19, which can appear on methods.ClassFile APIModels theRuntimeInvisibleTypeAnnotations
attribute 4.7.21, which can appear on classes, methods, fields, and code attributes.ClassFile APIModels theRuntimeVisibleAnnotations
attribute 4.7.16, which can appear on classes, methods, and fields.ClassFile APIModels theRuntimeVisibleParameterAnnotations
attribute 4.7.18, which can appear on methods.ClassFile APIModels theRuntimeVisibleTypeAnnotations
attribute 4.7.20, which can appear on classes, methods, fields, and code attributes.ClassFile APIModels theSignature
attribute 4.7.9, which can appear on classes, methods, or fields.ClassFile APIModels theSourceDebugExtension
attribute.ClassFile APIModels theSourceFile
attribute 4.7.10, which can appear on classes.ClassFile APIModels theSourceID
attribute, which can appear on classes.ClassFile APIModels stack map frame ofStackMapTable
attribute 4.7.4.ClassFile APIA stack value for an object type.ClassFile APIAn uninitialized stack value.ClassFile APIThe type of a stack value.ClassFile APIClassFile APIModels theSynthetic
attribute 4.7.8, which can appear on classes, methods, and fields.ClassFile APIModels an unknown attribute on a class, method, or field.ClassFile APIAClassFileElement
PREVIEW describing an entity that has attributes, such as a class, field, method, code attribute, or record component.ClassFile APIBidirectional mapper between the classfile representation of an attribute and how that attribute is modeled in the API.ClassFile APIModels an entry in the bootstrap method table.ClassFile APISupports writing portions of a classfile to a growable buffer.ClassFile APIA builder for classfiles.ClassFile APIA marker interface for elements that can appear when traversing aClassModel
PREVIEW or be presented to aClassBuilder
PREVIEW.ClassFile APIRepresents a context for parsing, transforming, and generating classfiles.ClassFile APIOption describing attribute mappers for custom attributes.ClassFile APIOption describing the class hierarchy resolver to use when generating stack maps.ClassFile APIAn option that affects the parsing and writing of classfiles.ClassFile APIA builder for a classfile or portion of a classfile.ClassFile APIImmutable model for a portion of (or the entirety of) a classfile.ClassFile APIA transformation on streams of elements.ClassFile APIThe result of binding a transform to a builder.ClassFile APIModels the classfile version information for a class.ClassFile APIProvides class hierarchy information for generating correct stack maps during code building.ClassFile APIInformation about a resolved class.ClassFile APIModels a classfile.ClassFile APISupports reading from a classfile.ClassFile APIModels the generic signature of a class file, as defined by 4.7.9.ClassFile APIA transformation on streams ofClassElement
PREVIEW.ClassFile APIA builder for code attributes (method bodies).ClassFile APIA builder for blocks of code.ClassFile APIA builder to add catch blocks.ClassFile APIA marker interface for elements that can appear when traversing aCodeModel
PREVIEW or be presented to aCodeBuilder
PREVIEW.ClassFile APIModels the body of a method (theCode
attribute).ClassFile APIA transformation on streams ofCodeElement
PREVIEW.ClassFile APIA leaf node holding single printable value.ClassFile APIA tree node holdingList
of nested nodes.ClassFile APIA tree node holdingMap
of nested nodes.ClassFile APINamed, traversable, and printable node parent.ClassFile APIClassRemapper
is aClassTransform
PREVIEW,FieldTransform
PREVIEW,MethodTransform
PREVIEW andCodeTransform
PREVIEW deeply re-mapping all class references in any form, according to given map or map function.ClassFile APICodeLocalsShifter
PREVIEW is aCodeTransform
PREVIEW shifting locals to newly allocated positions to avoid conflicts during code injection.ClassFile APIA code relabeler is aCodeTransform
PREVIEW replacing all occurrences ofLabel
PREVIEW in the transformed code with new instances.ClassFile APICodeStackTracker
PREVIEW is aCodeTransform
PREVIEW tracking stack content and calculating max stack size.ClassFile APIAClassFileElement
PREVIEW that has complex structure defined in terms of other classfile elements, such as a method, field, method body, or entire class.ClassFile APIA constant pool entry that may be used as an annotation constant, which includes the four kinds of primitive constants, and UTF8 constants.ClassFile APIModels aCONSTANT_Class_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_Dynamic_info
constant in the constant pool of a classfile.ClassFile APIProvides read access to the constant pool and bootstrap method table of a classfile.ClassFile APIBuilder for the constant pool of a classfile.ClassFile APIModels a constant pool entry that can be used as the constant in aConstantValue
attribute; this includes the four primitive constant types and String constants.ClassFile APIModels aCONSTANT_Double_info
constant in the constant pool of a classfile.ClassFile APIModels a dynamic constant pool entry, which is eitherConstantDynamicEntry
PREVIEW orInvokeDynamicEntry
PREVIEW.ClassFile APIModels aCONSTANT_Fieldref_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_Float_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_Integer_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_InterfaceMethodRef_info
constant in the constant pool of a classfile.ClassFile APIModels a constant pool entry for a dynamic call site.ClassFile APIMarker interface for constant pool entries suitable for loading via theLDC
instructions.ClassFile APIModels aCONSTANT_Long_info
constant in the constant pool of a classfile.ClassFile APIModels a member reference constant in the constant pool of a classfile, which includes references to fields, methods, and interface methods.ClassFile APIModels aCONSTANT_MethodHandle_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_MethodRef_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_MethodType_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_Module_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_NameAndType_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_Package_info
constant in the constant pool of a classfile.ClassFile APIModels an entry in the constant pool of a classfile.ClassFile APIModels aCONSTANT_String_info
constant in the constant pool of a classfile.ClassFile APIModels aCONSTANT_UTF8_info
constant in the constant pool of a classfile.ClassFile APIA builder for fields.ClassFile APIA marker interface for elements that can appear when traversing aFieldModel
PREVIEW or be presented to aFieldBuilder
PREVIEW.ClassFile APIModels a field.ClassFile APIA transformation on streams ofFieldElement
PREVIEW.ClassFile APIModels an executable instruction in a method body.ClassFile APIModels an array load instruction in thecode
array of aCode
attribute.ClassFile APIModels an array store instruction in thecode
array of aCode
attribute.ClassFile APIModels a branching instruction (conditional or unconditional) in thecode
array of aCode
attribute.ClassFile APIA pseudo-instruction which models a single entry in theCharacterRangeTableAttribute
PREVIEW.ClassFile APIModels a constant-load instruction in thecode
array of aCode
attribute, including "intrinsic constant" instructions (e.g.,iconst_0
), "argument constant" instructions (e.g.,bipush
), and "load constant" instructions (e.g.,LDC
).ClassFile APIModels an "argument constant" instruction (e.g.,bipush
).ClassFile APIModels an "intrinsic constant" instruction (e.g.,iconst_0
).ClassFile APIModels a "load constant" instruction (e.g.,ldc
).ClassFile APIModels a primitive conversion instruction in thecode
array of aCode
attribute, such asi2l
.ClassFile APIModels instruction discontinued from thecode
array of aCode
attribute.ClassFile APIModels JSR and JSR_W instructions discontinued from thecode
array of aCode
attribute since class file version 51.0.ClassFile APIModels RET and RET_W instructions discontinued from thecode
array of aCode
attribute since class file version 51.0.ClassFile APIA pseudo-instruction modeling an entry in the exception table of a code attribute.ClassFile APIModels a field access instruction in thecode
array of aCode
attribute.ClassFile APIModels a local variable increment instruction in thecode
array of aCode
attribute.ClassFile APIModels aninvokedynamic
instruction in thecode
array of aCode
attribute.ClassFile APIModels a method invocation instruction in thecode
array of aCode
attribute, other thaninvokedynamic
.ClassFile APIA pseudo-instruction which indicates that the specified label corresponds to the current position in theCode
attribute.ClassFile APIA pseudo-instruction which models a single entry in theLineNumberTableAttribute
PREVIEW.ClassFile APIModels a local variable load instruction in thecode
array of aCode
attribute.ClassFile APIA pseudo-instruction which models a single entry in theLocalVariableTableAttribute
PREVIEW.ClassFile APIA pseudo-instruction which models a single entry in theLocalVariableTypeTableAttribute
PREVIEW.ClassFile APIModels alookupswitch
instruction in thecode
array of aCode
attribute.ClassFile APIModels amonitorenter
ormonitorexit
instruction in thecode
array of aCode
attribute.ClassFile APIModels amultianewarray
invocation instruction in thecode
array of aCode
attribute.ClassFile APIModels anew
instruction in thecode
array of aCode
attribute.ClassFile APIModels anewarray
invocation instruction in thecode
array of aCode
attribute.ClassFile APIModels aanewarray
invocation instruction in thecode
array of aCode
attribute.ClassFile APIModels anop
invocation instruction in thecode
array of aCode
attribute.ClassFile APIModels an arithmetic operator instruction in thecode
array of aCode
attribute.ClassFile APIModels a return-from-method instruction in thecode
array of aCode
attribute.ClassFile APIModels a stack manipulation instruction in thecode
array of aCode
attribute.ClassFile APIModels a local variable store instruction in thecode
array of aCode
attribute.ClassFile APIModels a single case in alookupswitch
ortableswitch
instruction.ClassFile APIModels atableswitch
instruction in thecode
array of aCode
attribute.ClassFile APIModels anathrow
instruction in thecode
array of aCode
attribute.ClassFile APIModels aninstanceof
orcheckcast
instruction in thecode
array of aCode
attribute.ClassFile APIModels the interfaces of a class.ClassFile APIA marker for a position within the instructions of a method body.ClassFile APIA builder for methods.ClassFile APIA marker interface for elements that can appear when traversing aMethodModel
PREVIEW or be presented to aMethodBuilder
PREVIEW.ClassFile APIModels a method.ClassFile APIModels the generic signature of a method, as defined by 4.7.9.ClassFile APIA transformation on streams ofMethodElement
PREVIEW.ClassFile APIModels metadata about aCodeAttribute
PREVIEW, such as entries in the exception table, line number table, local variable table, or the mapping between instructions and labels.ClassFile APIModels generic Java type signatures, as defined in 4.7.9.1.ClassFile APIModels the signature of an array type.ClassFile APIModels the signature of a primitive type or voidClassFile APIModels the signature of a possibly-parameterized class or interface type.ClassFile APIModels the signature of a reference type, which may be a class, interface, type variable, or array type.ClassFile APIModels a signature for a throwable type.ClassFile APIModels the type argument.ClassFile APIModels a signature for a type parameter of a generic class or method.ClassFile APIModels the signature of a type variable.ClassFile APIModels the superclass of a class.ClassFile APIClassFile APIIndicates that an annotation appears on the i'th type in an exception parameter declaration.ClassFile APIIndicates that an annotation appears on either the type in a field declaration, the return type of a method, the type of a newly constructed object, or the receiver type of a method or constructor.ClassFile APIIndicates that an annotation appears on the type in a formal parameter declaration of a method, constructor, or lambda expression.ClassFile APIIndicates that an annotation appears on the type in a local variable declaration, including a variable declared as a resource in a try-with-resources statement.ClassFile APIIndicates a range of code array offsets within which a local variable has a value, and the index into the local variable array of the current frame at which that local variable can be found.ClassFile APIIndicates that an annotation appears on either the type in an instanceof expression or a new expression, or the type before the :: in a method reference expression.ClassFile APIIndicates that an annotation appears on a type in the extends or implements clause of a class or interface declaration.ClassFile APISpecifies which type in a declaration or expression is being annotated.ClassFile APIIndicates that an annotation appears on the i'th type in the throws clause of a method or constructor declaration.ClassFile APIIndicates that an annotation appears either 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.ClassFile APIIndicates that an annotation appears on the i'th bound of the j'th type parameter declaration of a generic class, interface, method, or constructor.ClassFile APIIndicates that an annotation appears on the declaration of the i'th type parameter of a generic class, generic interface, generic method, or generic constructor.ClassFile APIJVMS: Type_path structure identifies which part of the type is annotated, as defined in 4.7.20.2ClassFile APIA classfile element that can encode itself as a stream of bytes in the encoding expected by the classfile format.String TemplatesStringTemplate
PREVIEW is the run-time representation of a string template or text block template in a template expression.String TemplatesThis interface describes the methods provided by a generalized string template processor.String TemplatesBuilt-in policies using this additional interface have the flexibility to specialize the composition of the templated string by returning a customizedMethodHandle
fromlinkage
PREVIEW.Structured ConcurrencyRepresents a subtask forked withStructuredTaskScope.fork(Callable)
PREVIEW.Stream GatherersAn intermediate operation that transforms a stream of input elements into a stream of output elements, optionally applying a final action when the end of the upstream is reached.Stream GatherersA Downstream object is the next stage in a pipeline of operations, to which elements can be sent.Stream GatherersAn Integrator receives elements and processes them, optionally using the supplied state, and optionally sends incremental results downstream.Stream GatherersGreedy Integrators consume all their input, and may only relay that the downstream does not want more elements.
-
ClassPreview FeatureDescriptionClassFile APIAttribute mappers for standard classfile attributes.ClassFile APIA printer of classfiles and its elements.ClassFile APIModels a non-standard attribute of a classfile.String TemplatesManages string template bootstrap methods.Scoped ValuesA value that may be safely and efficiently shared to methods without using method parameters.Scoped ValuesA mapping of scoped values, as keys, to values.Structured ConcurrencyA basic API for structured concurrency.Structured ConcurrencyStructured ConcurrencyA
StructuredTaskScope
that captures the result of the first subtask to complete successfullyPREVIEW.String TemplatesThisStringTemplate.Processor
PREVIEW constructs aString
result usingFormatter
specifications and values found in theStringTemplate
PREVIEW.Stream GatherersA skeletal visitor for annotation values with default behavior appropriate for a preview source version.A skeletal visitor of program elements with default behavior appropriate for a preview source version.A skeletal visitor of types with default behavior appropriate for a preview source version.A scanning visitor of program elements with default behavior appropriate for a preview source version.A simple visitor for annotation values with default behavior appropriate for a preview source version.A simple visitor of program elements with default behavior appropriate for a preview source version.A simple visitor of types with default behavior appropriate for a preview source version.
-
Enum ClassPreview FeatureDescriptionClassFile APIA simple stack value.ClassFile APIAttribute stability indicatorClassFile APIOption describing whether to process or discard unrecognized or problematic original attributes when a class, record component, field, method or code is transformed in its exploded form.ClassFile APIOption describing whether to preserve the original constant pool when transforming a classfile.ClassFile APIOption describing whether to patch out unreachable code.ClassFile APIOption describing whether to filter unresolved labels.ClassFile APIOption describing whether to process or discard debug elements.ClassFile APIOption describing whether to process or discard line numbers.ClassFile APIOption describing whether to automatically rewrite short jumps to long when necessary.ClassFile APIOption describing whether to generate stackmaps.ClassFile APILevel of detail to print or export.ClassFile APIDescribes the opcodes of the JVM instruction set, as described in 6.5.ClassFile APIKinds of opcodes.ClassFile APIIndicator for whether a wildcard has default bound, no bound, an upper bound, or a lower boundClassFile APIThe kind of target on which the annotation appears, as defined in 4.7.20.1.ClassFile APIType path kind, as defined in 4.7.20.2ClassFile APIDescribes the types that can be part of a field or method descriptor.Structured ConcurrencyRepresents the state of a subtask.
-
Exception ClassPreview FeatureDescriptionClassFile APIThrown to indicate that requested entry cannot be obtained from the constant pool.Structured ConcurrencyThrown when a structure violation is detected.
-
FieldPreview FeatureDescriptionString TemplatesMaximum number of argument slots in String Concat call.
-
MethodPreview FeatureDescriptionString TemplatesVisits a StringTemplateTree node.String TemplatesVisits a StringTemplateTree node.String TemplatesVisits a StringTemplateTree node.String TemplatesSimplified concatenation method to facilitate
StringTemplate
PREVIEW concatenation.java.lang.invoke.StringConcatFactory.makeConcatWithTemplateCluster(List<String>, List<Class<?>>, int) PREVIEWString TemplatesThis method breaks up large concatenations into separateMethodHandles
based on the number of slots required perMethodHandle
.java.lang.invoke.StringConcatFactory.makeConcatWithTemplateGetters(List<String>, List<MethodHandle>, int) PREVIEWString TemplatesThis method creates aMethodHandle
expecting one input, the receiver of the supplied getters.Stream Gatherers
-
Enum ConstantPreview FeatureDescriptionString TemplatesUsed for instances of
StringTemplateTree
PREVIEW.