|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.AttributeDefinition
public class AttributeDefinition
An attribute is defined by it's set and get methods. This class defines such attributes. E.g. a String attribute 'name' would be defined as
AttributeDefinition nameA = new AttributeDefinition(String.class, "Name");a boolean attribute would look like
AttributeDefinition hiddenA = new AttributeDefinition(Boolean.class, "Hidden",
"is", "set");
meaning that the attribute Hidden is accessible through isHidden() and
setHidden(Boolean) methods.
ClassDescriptor| Constructor Summary | |
|---|---|
AttributeDefinition(Class describedClass,
Class type,
String key)
Creates a method key where read prefix is 'get' and write prefix is 'set' |
|
AttributeDefinition(Class describedClass,
Class type,
String key,
AttributeReader reader)
Creates a method key where read prefix is 'get' and write prefix is 'set' with an attribute reader that reads a value from this attribute type. |
|
AttributeDefinition(Class describedClass,
Class type,
String key,
String readPrefix,
String writePrefix)
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
A defined attribute is equal to another if the keys are the same. |
Class |
getAttributeType()
|
Class |
getDescribedClass()
|
String |
getKey()
|
AttributeReader |
getReader()
|
String |
getReadMethodName()
|
String |
getWriteMethodName()
|
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeDefinition(Class describedClass,
Class type,
String key)
describedClass - type - of this attribute valuekey - identifying this attribute
public AttributeDefinition(Class describedClass,
Class type,
String key,
AttributeReader reader)
describedClass - type - of this attribute valuekey - identifying this attributereader - the reader that reads an attribute from this attribute e.g.
the name of a Nameable type
public AttributeDefinition(Class describedClass,
Class type,
String key,
String readPrefix,
String writePrefix)
describedClass - type - of this attribute valuekey - identifying this attributereadPrefix - e.g. 'get' or 'is' for boolean valueswritePrefix - e.g. 'set'| Method Detail |
|---|
public String getKey()
public String getReadMethodName()
public String getWriteMethodName()
public Class getAttributeType()
public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic Class getDescribedClass()
public AttributeReader getReader()
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||