public class Attribute extends Object
CaseComponent| Constructor and Description |
|---|
Attribute(Field f)
Creates an Attribute using the Field obtained with Reflection (getClass.getDeclaredField(name)).
|
Attribute(String attributeName,
Class<?> _class)
Creates an attribute.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
Class<?> |
getDeclaringClass()
Returns the class that this attribute belongs to.
|
String |
getName()
Returns the name of the field.
|
Class<?> |
getType()
Returns the type of the attribute.
|
Object |
getValue(Object obj)
Returns the value of the attribute for a concrete object.
|
int |
hashCode()
Returns the hashCode of the attribute.
|
void |
setValue(Object obj,
Object value)
Sets the value of the attribute in a concrete object.
|
public Attribute(Field f)
public Class<?> getDeclaringClass()
public Object getValue(Object obj) throws AttributeAccessException
obj - Instance to obtain the attribute fromAttributeAccessExceptionpublic void setValue(Object obj, Object value) throws AttributeAccessException
obj - Object that defines the attribute to set.value - Value to set.AttributeAccessExceptionpublic int hashCode()
Copyright © 2018 Group of Artificial Intelligence Applications (GAIA). All rights reserved.