openjava.mop
Class Signature

java.lang.Object
  |
  +--openjava.mop.Signature

public final class Signature
extends Object

The class Signature represents a signature of members of class; innerclass, field, method, or constructor.

Objects are immutable.

Since:
%SOFTWARE% 1.0
Version:
1.0
Author:
Michiaki Tatsubori
See Also:
Object

Field Summary
private  int _kind
           
private  String _name
           
private  OJClass[] _parameters
           
private  OJClass _returnType
           
static int CLASS
           
static int CONSTRUCTOR
           
static int FIELD
           
private  int hashCodeCache
           
static int METHOD
           
private  String strCache
           
 
Constructor Summary
Signature(OJClass clazz)
           
Signature(OJClass[] paramtypes)
           
Signature(OJConstructor constructor)
           
Signature(OJField field)
           
Signature(OJMethod method)
           
Signature(String name)
           
Signature(String name, OJClass[] paramtypes)
           
 
Method Summary
static OJClass commonBaseType(OJClass a, OJClass b)
           
static OJClass[] commonBaseTypes(OJClass[] a, OJClass[] b)
           
private  boolean compareParams(OJClass[] params)
           
 boolean equals(Object obj)
           
 boolean equals(Signature sign)
           
 String getName()
           
 OJClass[] getParameterTypes()
           
private  OJClass getReturnType()
           
private  String getStringValue()
           
 int hashCode()
           
 boolean isClass()
           
 boolean isConstructor()
           
 boolean isField()
           
 boolean isMethod()
           
 int kind()
           
protected  OJClass[] parameterTypes()
           
 boolean strictlyEquals(Signature sign)
           
 String toString()
          Returns the String representation of this signature.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS

public static final int CLASS
See Also:
Constant Field Values

FIELD

public static final int FIELD
See Also:
Constant Field Values

METHOD

public static final int METHOD
See Also:
Constant Field Values

CONSTRUCTOR

public static final int CONSTRUCTOR
See Also:
Constant Field Values

_kind

private int _kind

_returnType

private OJClass _returnType

_name

private String _name

_parameters

private OJClass[] _parameters

strCache

private String strCache

hashCodeCache

private int hashCodeCache
Constructor Detail

Signature

public Signature(String name)

Signature

public Signature(String name,
                 OJClass[] paramtypes)

Signature

public Signature(OJClass[] paramtypes)

Signature

public Signature(OJClass clazz)

Signature

public Signature(OJField field)

Signature

public Signature(OJMethod method)

Signature

public Signature(OJConstructor constructor)
Method Detail

parameterTypes

protected OJClass[] parameterTypes()

kind

public int kind()

toString

public String toString()
Returns the String representation of this signature.

Overrides:
toString in class Object
Returns:
the string representation of this signature.

getStringValue

private String getStringValue()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getReturnType

private OJClass getReturnType()

getName

public String getName()

getParameterTypes

public OJClass[] getParameterTypes()

equals

public boolean equals(Signature sign)

strictlyEquals

public boolean strictlyEquals(Signature sign)

compareParams

private final boolean compareParams(OJClass[] params)

isClass

public boolean isClass()

isConstructor

public boolean isConstructor()

isField

public boolean isField()

isMethod

public boolean isMethod()

commonBaseType

public static OJClass commonBaseType(OJClass a,
                                     OJClass b)

commonBaseTypes

public static OJClass[] commonBaseTypes(OJClass[] a,
                                        OJClass[] b)

SourceForge.net_Logo