JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.core.rtti
Class MetaItemDelegate

java.lang.Object
  |
  +--org.objectweb.jac.core.rtti.MetaItem
        |
        +--org.objectweb.jac.core.rtti.MetaItemDelegate
Direct Known Subclasses:
ClassItem, MemberItem

public abstract class MetaItemDelegate
extends 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:

Author:
Renaud Pawlak, Laurent Martelli

Field Summary
protected  Object delegate
          Stores the corresponding jav.lang.reflect meta item.
protected  MetaItemDelegate parent
          Stores the parent of this meta item
 
Fields inherited from class org.objectweb.jac.core.rtti.MetaItem
attrACs
 
Constructor Summary
MetaItemDelegate()
           
MetaItemDelegate(Object delegate)
          Default contructor to create a new meta item object.
 
Method Summary
 Object getDelegate()
           
 int getModifiers()
          Get the modifiers (see java.lang.reflect) of the meta item.
 MetaItemDelegate getParent()
          Gets the parent class item of this meta item.
abstract  Class getType()
          This method gets the type of the meta item by delegating to the actual java.lang.reflect meta item.
 void setParent(MetaItemDelegate parent)
          Sets the parent.
 String toString()
          Overloads the default method to call the delegate one.
 
Methods inherited from class org.objectweb.jac.core.rtti.MetaItem
getAttribute, getAttribute, getAttribute, getAttributeAlways, getBoolean, getItemClass, getName, registerAccessController, setAttribute, setItemClass, unsetAttribute, unsetAttributesFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

delegate

protected Object delegate
Stores the corresponding jav.lang.reflect meta item.


parent

protected MetaItemDelegate parent
Stores the parent of this meta item

Constructor Detail

MetaItemDelegate

public MetaItemDelegate(Object delegate)
                 throws InvalidDelegateException
Default contructor to create a new meta item object.

Parameters:
delegate - the java.lang.reflect actual meta item

MetaItemDelegate

public MetaItemDelegate()
Method Detail

getDelegate

public Object getDelegate()

setParent

public final void setParent(MetaItemDelegate parent)
                     throws org.objectweb.jac.core.rtti.InvalidParentException
Sets the parent.

For any type of meta item, the only possible type of the parent is a class item. For a class item, the parent is null in most cases (except in the case of inner-classes).

Parameters:
parent - the new parent
org.objectweb.jac.core.rtti.InvalidParentException

getParent

public final MetaItemDelegate getParent()
Gets the parent class item of this meta item.

Returns:
the parent

getModifiers

public int getModifiers()
Get the modifiers (see java.lang.reflect) of the meta item.

Returns:
an int representing the modifiers
See Also:
Modifier

getType

public abstract Class getType()
This method gets the type of the meta item by delegating to the actual java.lang.reflect meta item.

Returns:
the item type

toString

public String toString()
Overloads the default method to call the delegate one.

Overrides:
toString in class Object
Returns:
a textual representation of the object

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli