org.codehaus.aspectwerkz.attribdef.definition.attribute
Class Attributes

java.lang.Object
  extended byorg.codehaus.aspectwerkz.attribdef.definition.attribute.Attributes

public class Attributes
extends java.lang.Object

Retrieves attributes on class, method and field level Based on code from the Attrib4j project by Mark Pollack and Ted Neward (http://attrib4j.sourceforge.net/).

Author:
Jonas Bonér

Constructor Summary
Attributes()
           
 
Method Summary
static java.lang.Object[] getAttributes(java.lang.Class klass)
          Return the list (possibly empty) of custom attributes associated with the class "klass".
static java.lang.Object[] getAttributes(java.lang.reflect.Field field)
          Return the list (possibly empty) of custom attributes associated with the field.
static java.lang.Object[] getAttributes(java.lang.reflect.Method method)
          Return all the attributes associated with the given method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Attributes

public Attributes()
Method Detail

getAttributes

public static java.lang.Object[] getAttributes(java.lang.Class klass)
Return the list (possibly empty) of custom attributes associated with the class "klass".

Parameters:
klass - The java.lang.Class object to find the attributes on.
Returns:
The possibly 0-length array of attributes

getAttributes

public static java.lang.Object[] getAttributes(java.lang.reflect.Method method)
Return all the attributes associated with the given method.

Parameters:
method - The java.lang.reflect.Method describing the method.
Returns:
Attribute[] all attributes associated with the method. Returns a 0 length array in case no attributes were found.

getAttributes

public static java.lang.Object[] getAttributes(java.lang.reflect.Field field)
Return the list (possibly empty) of custom attributes associated with the field.

Parameters:
field - The java.lang.reflect.Field object to find the attributes on.
Returns:
The possibly 0-length array of attributes


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.