Top Description Inners Fields Constructors Methods
org.aspectj.apache.bcel.classfile

public final Class Signature

extends Attribute
Class Inheritance
Imports
java.io.ByteArrayInputStream, .DataInputStream, .DataOutputStream, .IOException, org.aspectj.apache.bcel.Constants

This class is derived from Attribute and represents a reference to GJ attribute.
Author
M. Dahm
Version
$Id: Signature.java,v 1.11 2009/09/15 19:40:12 aclement Exp $
See Also
Attribute

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
Signature.MyByteArrayInputStream

Extends ByteArrayInputStream to make 'unreading' chars possible.

Field Summary

Modifier and TypeField and Description
private int
Inherited from org.aspectj.apache.bcel.classfile.Attribute:
cpoollengthnameIndexNoAttributestag

Constructor Summary

AccessConstructor and Description
public
Signature(Signature c)

Initialize from another object.

pack-priv
Signature(int
Index in constant pool to CONSTANT_Utf8
name_index
,
int
Content length in bytes
length
,
DataInputStream
Input stream
file
,
ConstantPool
Array of constants
constant_pool
)

Construct object from file stream.

public
Signature(int
Index in constant pool to CONSTANT_Utf8
name_index
,
int
Content length in bytes
length
,
int signature_index, ConstantPool
Array of constants
constant_pool
)

Method Summary

Modifier and TypeMethod and Description
public void
accept(ClassVisitor
Visitor object
v
)

Implements abstract org.aspectj.apache.bcel.classfile.Attribute.accept.

Implements org.aspectj.apache.bcel.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.
public final void
dump(DataOutputStream
Output file stream
file
)

Overrides org.aspectj.apache.bcel.classfile.Attribute.dump.

Dump source file attribute to file stream in binary format.
public final String

Returns:

GJ signature.
getSignature
()

public final int

Returns:

Index in constant pool of source file name.
getSignatureIndex
()

private static boolean
identStart(int ch)

public static final boolean
public static final boolean
private static final void
private static final void
public final void
setSignatureIndex(int signature_index)

public final String

Returns:

String representation
toString
()

Overrides org.aspectj.apache.bcel.classfile.Attribute.toString.

Returns a string representation of the object.
public static String
Inherited from org.aspectj.apache.bcel.classfile.Attribute:
getConstantPoolgetLengthgetNamegetNameIndexgetTagreadAttribute

Field Detail

signature_indexback to summary
private int signature_index

Constructor Detail

Signatureback to summary
public Signature(Signature c)

Initialize from another object. Note that both objects use the same references (shallow copy). Use clone() for a physical copy.

Signatureback to summary
pack-priv Signature(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException

Construct object from file stream.

Parameters
name_index:int

Index in constant pool to CONSTANT_Utf8

length:int

Content length in bytes

file:DataInputStream

Input stream

constant_pool:ConstantPool

Array of constants

Signatureback to summary
public Signature(int name_index, int length, int signature_index, ConstantPool constant_pool)
Parameters
name_index:int

Index in constant pool to CONSTANT_Utf8

length:int

Content length in bytes

constant_pool:ConstantPool

Array of constants

Method Detail

acceptback to summary
public void accept(ClassVisitor v)

Implements abstract org.aspectj.apache.bcel.classfile.Attribute.accept.

Implements org.aspectj.apache.bcel.classfile.Node.accept.

Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.

Parameters
v:ClassVisitor

Visitor object

Annotations
@Override
dumpback to summary
public final void dump(DataOutputStream file) throws IOException

Overrides org.aspectj.apache.bcel.classfile.Attribute.dump.

Dump source file attribute to file stream in binary format.

Parameters
file:DataOutputStream

Output file stream

Annotations
@Override
getSignatureback to summary
public final String getSignature()
Returns:String

GJ signature.

getSignatureIndexback to summary
public final int getSignatureIndex()
Returns:int

Index in constant pool of source file name.

identStartback to summary
private static boolean identStart(int ch)
isActualParameterListback to summary
public static final boolean isActualParameterList(String s)
isFormalParameterListback to summary
public static final boolean isFormalParameterList(String s)
matchGJIdentback to summary
private static final void matchGJIdent(Signature.MyByteArrayInputStream in, StringBuilder buf)
matchIdentback to summary
private static final void matchIdent(Signature.MyByteArrayInputStream in, StringBuilder buf)
setSignatureIndexback to summary
public final void setSignatureIndex(int signature_index)
toStringback to summary
public final String toString()

Overrides org.aspectj.apache.bcel.classfile.Attribute.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

String representation

Annotations
@Override
translateback to summary
public static String translate(String s)
org.aspectj.apache.bcel.classfile back to summary

private final Class Signature.MyByteArrayInputStream

extends ByteArrayInputStream
Class Inheritance

Extends ByteArrayInputStream to make 'unreading' chars possible.

Field Summary

Inherited from java.io.ByteArrayInputStream:
bufcountmarkpos

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv final String
pack-priv final int
mark()

pack-priv final void
reset(int p)

pack-priv final void
Inherited from java.io.ByteArrayInputStream:
availableclosemarkmarkSupportedreadreadreadAllBytesreadNBytesresetskiptransferTo

Constructor Detail

MyByteArrayInputStreamback to summary
pack-priv MyByteArrayInputStream(String data)

Method Detail

getDataback to summary
pack-priv final String getData()
markback to summary
pack-priv final int mark()
resetback to summary
pack-priv final void reset(int p)
unreadback to summary
pack-priv final void unread()