Package org.apache.bcel.classfile
Class ModuleProvides
java.lang.Object
org.apache.bcel.classfile.ModuleProvides
This class represents an entry in the provides table of the Module attribute. Each entry describes a service
implementation that the parent module provides.
- Since:
- 6.4.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final int
private final int[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class.copy()
void
dump
(DataOutputStream file) Dump table entry to file stream in binary format.private static String
getImplementationClassNameAtIndex
(ConstantPool constantPool, int index, boolean compactClassName) String[]
getImplementationClassNames
(ConstantPool constantPool, boolean compactClassName) Gets the array of implementation class names for this ModuleProvides.getInterfaceName
(ConstantPool constantPool) Gets the interface name for this ModuleProvides.toString()
toString
(ConstantPool constantPool)
-
Field Details
-
providesIndex
private final int providesIndex -
providesWithCount
private final int providesWithCount -
providesWithIndex
private final int[] providesWithIndex
-
-
Constructor Details
-
ModuleProvides
ModuleProvides(DataInput file) throws IOException Constructs object from file stream.- Parameters:
file
- Input stream- Throws:
IOException
- if an I/O Exception occurs in readUnsignedShort
-
-
Method Details
-
getImplementationClassNameAtIndex
private static String getImplementationClassNameAtIndex(ConstantPool constantPool, int index, boolean compactClassName) -
accept
Called by objects that are traversing the nodes of the tree implicitly defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects. -
copy
- Returns:
- deep copy of this object
-
dump
Dump table entry to file stream in binary format.- Parameters:
file
- Output file stream- Throws:
IOException
- if an I/O Exception occurs in writeShort
-
getImplementationClassNames
Gets the array of implementation class names for this ModuleProvides.- Parameters:
constantPool
- Array of constants usually obtained from the ClassFile objectcompactClassName
- false for original constant pool value, true to replace '/' with '.'- Returns:
- array of implementation class names
- Since:
- 6.10.0
-
getInterfaceName
Gets the interface name for this ModuleProvides.- Parameters:
constantPool
- Array of constants usually obtained from the ClassFile object- Returns:
- interface name
- Since:
- 6.10.0
-
toString
-
toString
- Returns:
- Resolved string representation
-