public final class Signature extends Attribute
Attribute
,
Serialized FormModifier and Type | Class and Description |
---|---|
private static class |
Signature.MyByteArrayInputStream
Extends ByteArrayInputStream to make 'unreading' chars possible.
|
Modifier and Type | Field and Description |
---|---|
private int |
signature_index |
constant_pool, length, name_index, tag
Constructor and Description |
---|
Signature(int name_index,
int length,
java.io.DataInputStream file,
ConstantPool constant_pool)
Construct object from file stream.
|
Signature(int name_index,
int length,
int signature_index,
ConstantPool constant_pool) |
Signature(Signature c)
Initialize from another object.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class.
|
Attribute |
copy(ConstantPool _constant_pool) |
void |
dump(java.io.DataOutputStream file)
Dump source file attribute to file stream in binary format.
|
java.lang.String |
getSignature() |
int |
getSignatureIndex() |
private static boolean |
identStart(int ch) |
static boolean |
isActualParameterList(java.lang.String s) |
static boolean |
isFormalParameterList(java.lang.String s) |
private static void |
matchGJIdent(Signature.MyByteArrayInputStream in,
java.lang.StringBuffer buf) |
private static void |
matchIdent(Signature.MyByteArrayInputStream in,
java.lang.StringBuffer buf) |
void |
setSignatureIndex(int signature_index) |
java.lang.String |
toString() |
static java.lang.String |
translate(java.lang.String s) |
addAttributeReader, clone, getConstantPool, getLength, getNameIndex, getTag, readAttribute, removeAttributeReader, setConstantPool, setLength, setNameIndex
public Signature(Signature c)
Signature(int name_index, int length, java.io.DataInputStream file, ConstantPool constant_pool) throws java.io.IOException
name_index
- Index in constant pool to CONSTANT_Utf8length
- Content length in bytesfile
- Input streamconstant_pool
- Array of constantsjava.io.IOException
public Signature(int name_index, int length, int signature_index, ConstantPool constant_pool)
name_index
- Index in constant pool to CONSTANT_Utf8length
- Content length in bytessignature_index
- Index in constant pool to CONSTANT_Utf8constant_pool
- Array of constantspublic void accept(Visitor v)
public final void dump(java.io.DataOutputStream file) throws java.io.IOException
public final int getSignatureIndex()
public final void setSignatureIndex(int signature_index)
signature_index
- the index info the constant pool of this signaturepublic final java.lang.String getSignature()
private static boolean identStart(int ch)
private static final void matchIdent(Signature.MyByteArrayInputStream in, java.lang.StringBuffer buf)
private static final void matchGJIdent(Signature.MyByteArrayInputStream in, java.lang.StringBuffer buf)
public static java.lang.String translate(java.lang.String s)
public static final boolean isFormalParameterList(java.lang.String s)
public static final boolean isActualParameterList(java.lang.String s)
public final java.lang.String toString()
public Attribute copy(ConstantPool _constant_pool)