|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcolibri.cbrcore.Attribute
public class Attribute
This class identifies an attribute of a CaseComponent (Java Bean). Attributes are part of CaseComponents and CaseComponentes build a case. Note that each CaseComponent must be a Java Bean, so this class represents a field of a Java Bean (with its getXXX() and setXXX() methods).
CaseComponent
Constructor Summary | |
---|---|
Attribute(java.lang.reflect.Field f)
Creates an Attribute using the Field obtained with Reflection (getClass.getDeclaredField(name)). |
|
Attribute(java.lang.String attributeName,
java.lang.Class _class)
Creates an attribute. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
java.lang.Class<?> |
getDeclaringClass()
Returns the class that this attribute belongs to. |
java.lang.String |
getName()
Returns the name of the field. |
java.lang.Class<?> |
getType()
Returns the type of the attribute. |
java.lang.Object |
getValue(java.lang.Object obj)
Returns the value of the attribute for a concrete object. |
int |
hashCode()
Returns the hashCode of the attribute. |
void |
setValue(java.lang.Object obj,
java.lang.Object value)
Sets the value of the attribute in a concrete object. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Attribute(java.lang.reflect.Field f)
public Attribute(java.lang.String attributeName, java.lang.Class _class)
attributeName
- Name of the field_class
- Class that the attribute belongs to.Method Detail |
---|
public java.lang.String getName()
public java.lang.Class<?> getDeclaringClass()
public java.lang.Class<?> getType()
public java.lang.Object getValue(java.lang.Object obj) throws AttributeAccessException
obj
- Instance to obtain the attribute from
AttributeAccessException
public void setValue(java.lang.Object obj, java.lang.Object value) throws AttributeAccessException
obj
- Object that defines the attribute to set.value
- Value to set.
AttributeAccessException
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
GAIA - Group for Artificial Intelligence Applications http://gaia.fdi.ucm.es |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |