Preview
Second Preview of ClassFile API (JEP 466).
Programs can only use ClassFileBuilder
when preview features are enabled.
Preview features may be removed in a future release,
or upgraded to permanent features of the Java platform.
ClassFile#build(ClassDesc, Consumer)
or to transforms.
Elements of the newly built entity can be specified
abstractly (by passing a ClassFileElement
to with(ClassFileElement)
or concretely by calling the various withXxx
methods.
ClassFileTransform
Modifier and Type | Method and Description |
---|---|
public default void | accept(E
the element e)Implements java. Integrate the |
public default boolean | Returns: whether the provided constant pool is compatible with this builderthe constant pool to test compatibility with source)Returns whether the provided constant pool is compatible with this builder. |
public ConstantPoolBuilder | Returns: the constant pool builder associated with this builderReturns the constant pool builder associated with this builder. |
public default void | transform(CompoundElement<E>
the model to transform model, ClassFileTransform<?, E, B> the transform to apply transform)Apply a transform to a model, directing results to this builder. |
public B | Returns: this builderthe element e)Integrate the |
accept | back to summary |
---|---|
public default void accept(E e) Implements java. Integrate the
|
canWriteDirect | back to summary |
---|---|
public default boolean canWriteDirect(ConstantPool source) Returns whether the provided constant pool is compatible with this builder.
|
constantPool | back to summary |
---|---|
public ConstantPoolBuilder constantPool() Returns the constant pool builder associated with this builder.
|
transform | back to summary |
---|---|
public default void transform(CompoundElement<E> model, ClassFileTransform<?, E, B> transform) Apply a transform to a model, directing results to this builder.
|
with | back to summary |
---|---|
public B with(E e) Integrate the
|