de.hilling.lang.metamodel.Attribute Maven / Gradle / Ivy
package de.hilling.lang.metamodel;
/**
* Description for a read-only attribute of a bean-style class.
* @param Declaring class of the attribute.
* @param Type of the attribute.
*/
public interface Attribute {
/**
* Return the name of the attribute.
*
* @return name
*/
String getName();
/**
* Return the managed type representing the type in which
* the attribute was declared.
*
* @return declaring type
*/
Class getDeclaringType();
/**
* Return the Java type of the represented attribute.
*
* @return Java type
*/
Class getJavaType();
/**
* Retrieve the attribute value from declaring object.
*
* @param object the object.
*
* @return value of the attribute in given object.
*/
A readAttribute(T object);
}