|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Facet
| Method Summary | |
|---|---|
boolean |
alwaysReplace()
Whether this facet implementation should replace existing (none-noop) implementations. |
java.lang.Class<? extends Facet> |
facetType()
Determines the type of this facet to be stored under. |
FacetHolder |
getFacetHolder()
The holder of this facet. |
Facet |
getUnderlyingFacet()
Underlying Facet of the same type, if any. |
boolean |
isDerived()
Whether this facet implementation is derived (as opposed to explicit); used to determine precedence. |
boolean |
isNoop()
Whether this facet implementation is a no-op. |
void |
setFacetHolder(FacetHolder facetHolder)
Allows reparenting of Facet. |
void |
setUnderlyingFacet(Facet underlyingFacet)
Sets underlying Facet, that is, creating a chain. |
| Method Detail |
|---|
FacetHolder getFacetHolder()
holder of this facet.
void setFacetHolder(FacetHolder facetHolder)
Used by Facet decorators.
facetHolder - Facet getUnderlyingFacet()
Facet of the same type, if any.
void setUnderlyingFacet(Facet underlyingFacet)
Facet, that is, creating a chain.
Must be of the same type.
java.lang.Class<? extends Facet> facetType()
The framework looks for Facets of certain well-known facet types. Each facet implementation
must specify which type of facet it corresponds to. This therefore allows the (rules of the)
programming model to be varied without impacting the rest of the framework.
For example, the ActionInvocationFacet specifies the facet to invoke an action. The typical
implementation of this wraps a public method. However, a different facet factory could be
installed that creates facet also of type ActionInvocationFacet but that have some other rule,
such as requiring an action prefix, or that decorate the interaction by logging it, for example.
boolean isDerived()
For example, we might derive the typical length of a property based on its type; but if the typical length has been explicitly specified using an annotation then that should take precedence.
boolean isNoop()
boolean alwaysReplace()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||