com.ideanest.attributes.impl
Class AttributesImpl

java.lang.Object
  extended bycom.ideanest.attributes.Attributes
      extended bycom.ideanest.attributes.impl.AttributesImpl

public class AttributesImpl
extends Attributes

Version:
$Revision: 1.3 $ ($Date: 2003/08/01 06:12:50 $)
Author:
Piotr Kaminski

Field Summary
static java.lang.String COALESCED_FILENAME
           
static java.lang.String FILENAME_SUFFIX
           
 
Fields inherited from class com.ideanest.attributes.Attributes
DEFAULT_IMPL_CLASS_NAME, IMPL_CLASS_NAME_PROPKEY
 
Constructor Summary
AttributesImpl()
           
 
Method Summary
static void appendParamTypes(java.lang.StringBuffer buf, java.lang.Class[] paramTypes)
           
 Bundle get(java.lang.Class klass)
          Get the attributes bundle for the given class.
 Bundle get(java.lang.reflect.Constructor constructor)
          Get the attributes bundle for the given constructor.
 Bundle get(java.lang.reflect.Field field)
          Get the attributes bundle for the given field.
 Bundle get(java.lang.reflect.Method method)
          Get the attributes bundle for the given method.
 Bundle getClass(java.lang.String className, java.lang.ClassLoader classLoader)
          Get the bundle of attributes for the given class.
 Bundle getConstructor(java.lang.String className, java.lang.String constructorSignature, java.lang.ClassLoader classLoader)
          Get the bundle of attributes for the given constructor.
 Bundle getField(java.lang.String className, java.lang.String fieldName, java.lang.ClassLoader classLoader)
          The the bundle of attributes for the given field.
 Bundle getMethod(java.lang.String className, java.lang.String methodSignature, java.lang.ClassLoader classLoader)
          Get the bundle of attributes for the given method.
 
Methods inherited from class com.ideanest.attributes.Attributes
getInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COALESCED_FILENAME

public static final java.lang.String COALESCED_FILENAME
See Also:
Constant Field Values

FILENAME_SUFFIX

public static final java.lang.String FILENAME_SUFFIX
See Also:
Constant Field Values
Constructor Detail

AttributesImpl

public AttributesImpl()
Method Detail

appendParamTypes

public static void appendParamTypes(java.lang.StringBuffer buf,
                                    java.lang.Class[] paramTypes)

get

public Bundle get(java.lang.Class klass)
Description copied from class: Attributes
Get the attributes bundle for the given class.

Specified by:
get in class Attributes
Parameters:
klass - the class for which attributes are needed
Returns:
the attributes for the desired class, possibly an empty bundle if none were found

get

public Bundle get(java.lang.reflect.Constructor constructor)
Description copied from class: Attributes
Get the attributes bundle for the given constructor.

Specified by:
get in class Attributes
Parameters:
constructor - the constructor for which attributes are needed
Returns:
the attributes for the desired constructor, possibly an empty bundle if none were found

get

public Bundle get(java.lang.reflect.Field field)
Description copied from class: Attributes
Get the attributes bundle for the given field.

Specified by:
get in class Attributes
Parameters:
field - the field for which attributes are needed
Returns:
the attributes for the desired field, possibly an empty bundle if none were found

get

public Bundle get(java.lang.reflect.Method method)
Description copied from class: Attributes
Get the attributes bundle for the given method.

Specified by:
get in class Attributes
Parameters:
method - the method for which attributes are needed
Returns:
the attributes for the desired method, possibly an empty bundle if none were found

getClass

public Bundle getClass(java.lang.String className,
                       java.lang.ClassLoader classLoader)
Description copied from class: Attributes
Get the bundle of attributes for the given class. The class name must be fully qualified with the class' package. For nested classes, use '$' to separate the parent and nested class names.

Specified by:
getClass in class Attributes
Parameters:
className - the fully qualified name of the class
classLoader - the class loader to use when fetching attribute descriptors, if null use the thread's context class loader
Returns:
the bundle of attributes for the class matching the given name

getConstructor

public Bundle getConstructor(java.lang.String className,
                             java.lang.String constructorSignature,
                             java.lang.ClassLoader classLoader)
Description copied from class: Attributes
Get the bundle of attributes for the given constructor. The name of the class to which the constructor belongs must be provided as for @link{#getClass}. The parameter type list must be provided as for @link{#getMethod}, but with the method name omitted. For example, "java.lang.Thread.<init>(java.lang.Runnable,java.lang.String)".

Specified by:
getConstructor in class Attributes
Parameters:
className - the fully qualified name of the constructor's class
constructorSignature - the parameter types of the desired constructor
classLoader - the class loader to use when fetching attribute descriptors, if null use the thread's context class loader
Returns:
the bundle of attributes for the constructor matching the given name

getField

public Bundle getField(java.lang.String className,
                       java.lang.String fieldName,
                       java.lang.ClassLoader classLoader)
Description copied from class: Attributes
The the bundle of attributes for the given field.

Specified by:
getField in class Attributes
Parameters:
className - the fully qualified name of the field's class
fieldName - the name of the desired field
classLoader - the class loader to use when fetching attribute descriptors, if null use the thread's context class loader
Returns:
the bundle of attributes for the field matching the given name

getMethod

public Bundle getMethod(java.lang.String className,
                        java.lang.String methodSignature,
                        java.lang.ClassLoader classLoader)
Description copied from class: Attributes
Get the bundle of attributes for the given method. The name of the class to which the method belongs must be provided as for @link{#getClass}. The method's signature consists of the method name and the parameter type list in parentheses. Each parameter type is a fully qualified type name encoded according to the rules of Class.getName(). The parameter types are separated by commas, with no spaces. The return type is not listed. Methods with no parameters must include an empty parameter list, '()'.

Specified by:
getMethod in class Attributes
Parameters:
className - the fully qualified name of the method's class
methodSignature - the name and parameter types of the desired method
classLoader - the class loader to use when fetching attribute descriptors, if null use the thread's context class loader
Returns:
the bundle of attributes for the method matching the given name
See Also:
Attributes.getClass(String,ClassLoader)