|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jac.core.rtti.MetaItem
This class defines the super class for all the meta items whithin the rtti aspect.
A meta item encapsulates a java.lang.reflect
item so
that the user of this item can add extra informations
(attributes). Typically this feature can be used by an aspect to
tag an element of the model to react to this tag later on.
Examples:
Field Summary | |
protected static HashMap |
attrACs
A correspondance table between the RRTI attributes and the aspect components that set them. |
Constructor Summary | |
MetaItem()
|
Method Summary | |
Object |
getAttribute(Object substance,
String name)
Gets the value of an attribute. |
Object |
getAttribute(String name)
Gets the value of an attribute. |
Object |
getAttribute(String name,
boolean always)
Gets the value of an attribute. |
Object |
getAttributeAlways(String name)
Gets the value of an attribute even if the aspect if not yet configured and weaved. |
boolean |
getBoolean(String name,
boolean defValue)
Gets the value of a boolean attribute. |
MetaItem |
getItemClass()
|
abstract String |
getName()
This method gets the name of the meta item by delegating to the actual java.lang.reflect meta item. |
static void |
registerAccessController(AttributeController controller)
Registers a new access controller for this application. |
void |
setAttribute(String name,
Object value)
Sets the value of an attribute. |
void |
setItemClass(MetaItem itemClass)
|
void |
unsetAttribute(String name)
Unsets the value of an attribute. |
static void |
unsetAttributesFor(String acName)
Unsets all the attributes of all the RTTI items that have been set by a given aspect component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static HashMap attrACs
Constructor Detail |
public MetaItem()
Method Detail |
public static void unsetAttributesFor(String acName)
acName
- the aspect component nameunsetAttribute(String)
public static void registerAccessController(AttributeController controller)
controller
- the controller objectpublic Object getAttribute(String name)
name
- the name of the attribute
public Object getAttributeAlways(String name)
name
- the name of the attribute
public Object getAttribute(String name, boolean always)
name
- the name of the attributealways
- if true, return a value even the aspect is not weaved
public boolean getBoolean(String name, boolean defValue)
name
- the name of the attributedefValue
- default value for the attribute if it is not set
public Object getAttribute(Object substance, String name)
substance
- name
- the name of the attribute
public final void setAttribute(String name, Object value)
name
- the name of the attributevalue
- the value of the attributepublic void unsetAttribute(String name)
name
- the name of the attribute to unsetpublic abstract String getName()
java.lang.reflect
meta item.
public void setItemClass(MetaItem itemClass)
public MetaItem getItemClass()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |