|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.metamodel.facets.FacetHolderImpl
public class FacetHolderImpl
For base subclasses or, more likely, to help write tests.
| Constructor Summary | |
|---|---|
FacetHolderImpl()
|
|
| Method Summary | ||
|---|---|---|
void |
addFacet(Facet facet)
Adds the facet, extracting its type as the key. |
|
void |
addFacet(MultiTypedFacet facet)
Adds the multi-typed facet, extracting each of its
types as keys. |
|
boolean |
containsFacet(java.lang.Class<? extends Facet> facetType)
Whether there is a facet registered of the specified type. |
|
|
getFacet(java.lang.Class<T> facetType)
Get the facet of the specified type (as per the type it reports from Facet.facetType()). |
|
Facet[] |
getFacets(Filter<Facet> filter)
Returns all Facets matching the specified FacetFilter. |
|
java.lang.Class<? extends Facet>[] |
getFacetTypes()
Get the list of all facet types that are supported by objects of this specification. |
|
void |
removeFacet(java.lang.Class<? extends Facet> facetType)
Remove the facet of the specified type. |
|
void |
removeFacet(Facet facet)
Remove the facet whose type is that reported by Facet.facetType(). |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FacetHolderImpl()
| Method Detail |
|---|
public boolean containsFacet(java.lang.Class<? extends Facet> facetType)
FacetHolder
Convenience; saves having to FacetHolder.getFacet(Class) and then check if null.
containsFacet in interface FacetHolderpublic void addFacet(Facet facet)
FacetHoldertype as the key.
If there are any facet of the same type, they will be overwritten provided that either the
Facet specifies to always replace or if the existing
Facet is a no-op.
addFacet in interface FacetHolderpublic void addFacet(MultiTypedFacet facet)
FacetHoldermulti-typed facet, extracting each of its
types as keys.
If there are any facet of the same type, they will be overwritten provided that either the
Facet specifies to always replace or if the existing
Facet is a no-op.
addFacet in interface FacetHolderpublic void removeFacet(Facet facet)
FacetHolderFacet.facetType().
removeFacet in interface FacetHolderpublic void removeFacet(java.lang.Class<? extends Facet> facetType)
FacetHolder
removeFacet in interface FacetHolderpublic <T extends Facet> T getFacet(java.lang.Class<T> facetType)
FacetHolderFacet.facetType()).
getFacet in interface FacetHolderpublic java.lang.Class<? extends Facet>[] getFacetTypes()
FacetHolder
getFacetTypes in interface FacetHolderpublic Facet[] getFacets(Filter<Facet> filter)
FacetHolderFacets matching the specified FacetFilter.
getFacets in interface FacetHolder
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||