| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <T> void | addFacet(final T obj)
Implements org. Add a facet to the object. |
| public <T> T | facet(Class<T> cls)
Implements org. Access the Facet of Class T from the object. |
| public Collection | facets()
Implements org. Return a list of all facets on this object. |
| public Object | get(Field field)
Implements org. Fetch the value of the field from whichever facet contains the field. |
| public Object | invoke(final Method method, final Object... args)
Implements org. Invoke method on the appropriate facet of this object, that is, on the facet corresponding to method.getDeclaringClass. |
| public void | removeFacet(Class<?> cls)
Implements org. Remove the facet (if any) of the given type. |
| public void |
| delegate | back to summary |
|---|---|
| private Object delegate | |
| facetMap | back to summary |
|---|---|
| private Map<Class<?>, Object> facetMap | |
| FacetAccessorImpl | back to summary |
|---|---|
| public FacetAccessorImpl(Object delegate) | |
| addFacet | back to summary |
|---|---|
| public <T> void addFacet(final T obj) Implements org. Doc from org. Add a facet to the object. The type T must not already be available as a facet.
| |
| facet | back to summary |
|---|---|
| public <T> T facet(Class<T> cls) Implements org. Doc from org. Access the Facet of Class T from the object.
| |
| facets | back to summary |
|---|---|
| public Collection Implements org. Doc from org. Return a list of all facets on this object.
| |
| get | back to summary |
|---|---|
| public Object get(Field field) Implements org. Doc from org. Fetch the value of the field from whichever facet contains the field. Read-only because that's all that the intended application needs.
| |
| invoke | back to summary |
|---|---|
| public Object invoke(final Method method, final Object... args) Implements org. Doc from org. Invoke method on the appropriate facet of this object, that is, on the facet corresponding to method.getDeclaringClass.
| |
| removeFacet | back to summary |
|---|---|
| public void removeFacet(Class<?> cls) Implements org. Doc from org. Remove the facet (if any) of the given type.
| |
| set | back to summary |
|---|---|
| public void set(Field field, Object value) Implements org.
| |