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
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
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)
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)