org.jboss.metadata.spi.signature
Class Signature

java.lang.Object
  extended by org.jboss.metadata.spi.signature.Signature
Direct Known Subclasses:
ConstructorSignature, DeclaredMethodSignature, FieldSignature, MethodSignature, ParametersSignature

public class Signature
extends Object

Signature.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Field Summary
static String NO_NAME
          No Name
static Class<?>[] NO_PARAMETER_TYPES
          No Parameters Types
static String[] NO_PARAMETERS
          No Parameters
 
Constructor Summary
Signature()
          Create a new Signature.
Signature(Class<?>... parameters)
          Create a new Signature.
Signature(String... parameters)
          Create a new Signature.
Signature(String name)
          Create a new Signature.
Signature(String name, Class<?>... parameters)
          Create a new Signature.
Signature(String name, String... parameters)
          Create a new Signature.
 
Method Summary
static String[] convertParameters(org.jboss.reflect.spi.TypeInfo[] typeInfos)
           
static Class<?>[] convertParameterTypes(org.jboss.reflect.spi.TypeInfo[] typeInfos)
           
 boolean equals(Object obj)
           
 String getName()
          Returns the name.
 String[] getParameters()
          Returns the parameters.
 Class<?>[] getParametersTypes(Class<?> clazz)
          Returns the parameter types.
protected  Class<?>[] getParameterTypes()
          Get the parameter types (for override by sub-classes)
static String getPrimativeArrayType(String name)
          Deprecated. 
static Signature getSignature(Member member)
          Get a signature for a member
static Signature getSignature(org.jboss.reflect.spi.MemberInfo member)
          Get a signature for a member info
 int hashCode()
           
protected  void internalToString(StringBuilder builder)
          Build the to String
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_NAME

public static final String NO_NAME
No Name

See Also:
Constant Field Values

NO_PARAMETERS

public static final String[] NO_PARAMETERS
No Parameters


NO_PARAMETER_TYPES

public static final Class<?>[] NO_PARAMETER_TYPES
No Parameters Types

Constructor Detail

Signature

public Signature()
Create a new Signature.


Signature

public Signature(String name)
Create a new Signature.

Parameters:
name - the name

Signature

public Signature(String... parameters)
Create a new Signature.

Parameters:
parameters - the parameters

Signature

public Signature(Class<?>... parameters)
Create a new Signature.

Parameters:
parameters - the parameters

Signature

public Signature(String name,
                 Class<?>... parameters)
Create a new Signature.

Parameters:
name - the name
parameters - the parameters

Signature

public Signature(String name,
                 String... parameters)
Create a new Signature.

Parameters:
name - the name
parameters - the parameters
Method Detail

getSignature

public static Signature getSignature(Member member)
Get a signature for a member

Parameters:
member - the member
Returns:
the result

getSignature

public static Signature getSignature(org.jboss.reflect.spi.MemberInfo member)
Get a signature for a member info

Parameters:
member - the member
Returns:
the result

getPrimativeArrayType

@Deprecated
public static String getPrimativeArrayType(String name)
Deprecated. 


convertParameters

public static String[] convertParameters(org.jboss.reflect.spi.TypeInfo[] typeInfos)

convertParameterTypes

public static Class<?>[] convertParameterTypes(org.jboss.reflect.spi.TypeInfo[] typeInfos)

getName

public String getName()
Returns the name.

Returns:
the name.

getParameters

public String[] getParameters()
Returns the parameters.

Returns:
the parameters.

getParameterTypes

protected Class<?>[] getParameterTypes()
Get the parameter types (for override by sub-classes)

Returns:
the parameters types

getParametersTypes

public Class<?>[] getParametersTypes(Class<?> clazz)
Returns the parameter types.

Parameters:
clazz - the reference class
Returns:
the parameter types.

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

internalToString

protected void internalToString(StringBuilder builder)
Build the to String

Parameters:
builder - the builder to use


Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.