Top Description Fields Constructors Methods
org.eclipse.persistence.internal.libraries.asm.commons

public final Class ModuleResolutionAttribute

extends Attribute
Class Inheritance
Imports
org.eclipse.persistence.internal.libraries.asm.Attribute, .ByteVector, .ClassReader, .ClassWriter, .Label

A ModuleResolution attribute. This attribute is specific to the OpenJDK and may change in the future.
Author
Remi Forax

Field Summary

Modifier and TypeField and Description
public int
resolution

The resolution state of the module.

public static final int
RESOLUTION_DO_NOT_RESOLVE_BY_DEFAULT

The resolution state of a module meaning that the module is not available from the class-path by default.

public static final int
RESOLUTION_WARN_DEPRECATED

The resolution state of a module meaning the module is marked as deprecated.

public static final int
RESOLUTION_WARN_DEPRECATED_FOR_REMOVAL

The resolution state of a module meaning the module is marked as deprecated and will be removed in a future release.

public static final int
RESOLUTION_WARN_INCUBATING

The resolution state of a module meaning the module is not yet standardized, so in incubating mode.

Inherited from org.eclipse.persistence.internal.libraries.asm.Attribute:
type

Constructor Summary

AccessConstructor and Description
public
ModuleResolutionAttribute(final int
the resolution state of the module. Must be one of RESOLUTION_WARN_DEPRECATED, RESOLUTION_WARN_DEPRECATED_FOR_REMOVAL, and RESOLUTION_WARN_INCUBATING.
resolution
)

Constructs a new ModuleResolutionAttribute.

public

Method Summary

Modifier and TypeMethod and Description
protected Attribute
read(final ClassReader
the class that contains the attribute to be read.
classReader
,
final int
index of the first byte of the attribute's content in ClassReader. The 6 attribute header bytes (attribute_name_index and attribute_length) are not taken into account here.
offset
,
final int
the length of the attribute's content (excluding the 6 attribute header bytes).
length
,
final char[]
the buffer to be used to call the ClassReader methods requiring a 'charBuffer' parameter.
charBuffer
,
final int
index of the first byte of content of the enclosing Code attribute in ClassReader, or -1 if the attribute to be read is not a Code attribute. The 6 attribute header bytes (attribute_name_index and attribute_length) are not taken into account here.
codeOffset
,
final Label[]
the labels of the method's code, or null if the attribute to be read is not a Code attribute.
labels
)

Overrides org.eclipse.persistence.internal.libraries.asm.Attribute.read.

Reads a type attribute.
protected ByteVector
write(final ClassWriter
the class to which this attribute must be added. This parameter can be used to add the items that corresponds to this attribute to the constant pool of this class.
classWriter
,
final byte[]
the bytecode of the method corresponding to this Code attribute, or null if this attribute is not a Code attribute. Corresponds to the 'code' field of the Code attribute.
code
,
final int
the length of the bytecode of the method corresponding to this code attribute, or 0 if this attribute is not a Code attribute. Corresponds to the 'code_length' field of the Code attribute.
codeLength
,
final int
the maximum stack size of the method corresponding to this Code attribute, or -1 if this attribute is not a Code attribute.
maxStack
,
final int
the maximum number of local variables of the method corresponding to this code attribute, or -1 if this attribute is not a Code attribute.
maxLocals
)

Overrides org.eclipse.persistence.internal.libraries.asm.Attribute.write.

Returns the byte array form of the content of this attribute.
Inherited from org.eclipse.persistence.internal.libraries.asm.Attribute:
getLabelsisCodeAttributeisUnknown

Field Detail

resolutionback to summary
public int resolution

The resolution state of the module. Must be one of RESOLUTION_WARN_DEPRECATED, RESOLUTION_WARN_DEPRECATED_FOR_REMOVAL, and RESOLUTION_WARN_INCUBATING.

RESOLUTION_DO_NOT_RESOLVE_BY_DEFAULTback to summary
public static final int RESOLUTION_DO_NOT_RESOLVE_BY_DEFAULT

The resolution state of a module meaning that the module is not available from the class-path by default.

RESOLUTION_WARN_DEPRECATEDback to summary
public static final int RESOLUTION_WARN_DEPRECATED

The resolution state of a module meaning the module is marked as deprecated.

RESOLUTION_WARN_DEPRECATED_FOR_REMOVALback to summary
public static final int RESOLUTION_WARN_DEPRECATED_FOR_REMOVAL

The resolution state of a module meaning the module is marked as deprecated and will be removed in a future release.

RESOLUTION_WARN_INCUBATINGback to summary
public static final int RESOLUTION_WARN_INCUBATING

The resolution state of a module meaning the module is not yet standardized, so in incubating mode.

Constructor Detail

ModuleResolutionAttributeback to summary
public ModuleResolutionAttribute(final int resolution)

Constructs a new ModuleResolutionAttribute.

Parameters
resolution:int

the resolution state of the module. Must be one of RESOLUTION_WARN_DEPRECATED, RESOLUTION_WARN_DEPRECATED_FOR_REMOVAL, and RESOLUTION_WARN_INCUBATING.

ModuleResolutionAttributeback to summary
public ModuleResolutionAttribute()

Constructs an empty ModuleResolutionAttribute. This object can be passed as a prototype to the ClassReader#accept(org.eclipse.persistence.internal.libraries.asm.ClassVisitor, Attribute[], int) method.

Method Detail

readback to summary
protected Attribute read(final ClassReader classReader, final int offset, final int length, final char[] charBuffer, final int codeOffset, final Label[] labels)

Overrides org.eclipse.persistence.internal.libraries.asm.Attribute.read.

Doc from org.eclipse.persistence.internal.libraries.asm.Attribute.read.

Reads a type attribute. This method must return a new Attribute object, of type type, corresponding to the 'length' bytes starting at 'offset', in the given ClassReader.

Parameters
classReader:ClassReader

the class that contains the attribute to be read.

offset:int

index of the first byte of the attribute's content in ClassReader. The 6 attribute header bytes (attribute_name_index and attribute_length) are not taken into account here.

length:int

the length of the attribute's content (excluding the 6 attribute header bytes).

charBuffer:char[]

the buffer to be used to call the ClassReader methods requiring a 'charBuffer' parameter.

codeOffset:int

index of the first byte of content of the enclosing Code attribute in ClassReader, or -1 if the attribute to be read is not a Code attribute. The 6 attribute header bytes (attribute_name_index and attribute_length) are not taken into account here.

labels:Label[]

the labels of the method's code, or null if the attribute to be read is not a Code attribute.

Returns:Attribute

a new Attribute object corresponding to the specified bytes.

Annotations
@Override
writeback to summary
protected ByteVector write(final ClassWriter classWriter, final byte[] code, final int codeLength, final int maxStack, final int maxLocals)

Overrides org.eclipse.persistence.internal.libraries.asm.Attribute.write.

Doc from org.eclipse.persistence.internal.libraries.asm.Attribute.write.

Returns the byte array form of the content of this attribute. The 6 header bytes (attribute_name_index and attribute_length) must not be added in the returned ByteVector.

Parameters
classWriter:ClassWriter

the class to which this attribute must be added. This parameter can be used to add the items that corresponds to this attribute to the constant pool of this class.

code:byte[]

the bytecode of the method corresponding to this Code attribute, or null if this attribute is not a Code attribute. Corresponds to the 'code' field of the Code attribute.

codeLength:int

the length of the bytecode of the method corresponding to this code attribute, or 0 if this attribute is not a Code attribute. Corresponds to the 'code_length' field of the Code attribute.

maxStack:int

the maximum stack size of the method corresponding to this Code attribute, or -1 if this attribute is not a Code attribute.

maxLocals:int

the maximum number of local variables of the method corresponding to this code attribute, or -1 if this attribute is not a Code attribute.

Returns:ByteVector

the byte array form of this attribute.

Annotations
@Override