public class Signature extends Object
"method signature". It is a container
for a Class array and can be used as hash-key.isApplicable(Signature)| Modifier and Type | Field and Description |
|---|---|
private int |
hash
bleeding edge performance hack
|
private Class<?>[] |
signature
the wrapped signature
|
static Signature |
VOID
the void signature for a non-arg method
|
| Modifier | Constructor and Description |
|---|---|
|
Signature(Class<?>... theSignature)
The constructor.
|
protected |
Signature(int hash,
Class<?>... theSignature)
The constructor.
|
|
Signature(Method method)
The constructor.
|
|
Signature(Object... arguments)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
Class<?> |
getType(int position)
This method gets the
type of this signature at the given position. |
int |
getTypeCount()
This method gets the number of
types in this signature. |
int |
hashCode() |
boolean |
isApplicable(Signature s)
This method determines if the given signature is applicable for this signature.
|
String |
toString() |
protected void |
toString(StringBuilder buffer) |
public static final Signature VOID
private final Class<?>[] signature
private final int hash
public Signature(Class<?>... theSignature)
theSignature - is the signature to wrap.protected Signature(int hash,
Class<?>... theSignature)
hash - the base value for hashCode().theSignature - is the signature to wrap.public Signature(Method method)
method - is the Method whose signature should be wrapped.public Signature(Object... arguments)
arguments - is a specific argument list to create a signature from.public boolean isApplicable(Signature s)
s. contain null.s - is the signature to test.true if the given signature is applicable for this signature, false otherwise.public int getTypeCount()
types in this signature.public Class<?> getType(int position)
type of this signature at the given position.position - is the index of the requested type. This value must be in the range from 0 to
getTypeCount() - 1.type at the given index.protected void toString(StringBuilder buffer)
buffer - the StringBuilder to to.toString()Copyright © 2001–2016 mmm-Team. All rights reserved.