|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FacetAccessor
Interface to access facets of an object. A facet is an instance of a particular class. It may be implemented in a variety of ways, including inheritance, delegation, or dynamic construction on demand.
| Method Summary | ||
|---|---|---|
|
addFacet(T obj)
Add a facet to the object. |
|
|
facet(Class<T> cls,
boolean debug)
Access the Facet of Class T from the object. |
|
Collection<Object> |
facets()
Return a list of all facets on this object. |
|
Object |
get(Field field,
boolean debug)
Fetch the value of the field from whichever facet contains the field. |
|
Object |
invoke(Method method,
boolean debug,
Object... args)
Invoke method on the appropriate facet of this object, that is, on the facet corresponding to method.getDeclaringClass. |
|
void |
removeFacet(Class<?> cls)
Remove the facet (if any) of the given type. |
|
void |
set(Field field,
Object value,
boolean debug)
|
|
| Method Detail |
|---|
<T> T facet(Class<T> cls,
boolean debug)
T - The Type (as a Class) of the Facet.cls - The class of the facet.
<T> void addFacet(T obj)
T - obj - void removeFacet(Class<?> cls)
cls - The class of the facet to remove.Collection<Object> facets()
Object invoke(Method method,
boolean debug,
Object... args)
method - The method to invoke.args - Arguments to the method.
Object get(Field field,
boolean debug)
field - The field to accessdebug - True if debugging trace output is desired
void set(Field field,
Object value,
boolean debug)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||