public interface Facet
| Modifier and Type | Method and Description |
|---|---|
boolean |
alwaysReplace()
Whether this facet implementation should replace existing (none-noop)
implementations.
|
Class<? extends Facet> |
facetType()
Determines the type of this facet to be stored under.
|
FacetHolder |
getFacetHolder()
The
holder of this facet. |
Facet |
getUnderlyingFacet()
|
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. |
FacetHolder getFacetHolder()
holder of this facet.void setFacetHolder(FacetHolder facetHolder)
Used by Facet decorators.
facetHolder - Facet getUnderlyingFacet()
void setUnderlyingFacet(Facet underlyingFacet)
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()
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.