public abstract class AbstractFaceted<FACETTYPE extends Facet<?>> extends Object implements MutableFaceted<FACETTYPE>
Constructor and Description |
---|
AbstractFaceted() |
Modifier and Type | Method and Description |
---|---|
<F extends FACETTYPE> |
getFacet(Class<F> type)
Return the instance of the requested
Facet type, or throw a FacetNotFoundException if no
Facet of that type is installed. |
Iterable<FACETTYPE> |
getFacets()
|
<F extends FACETTYPE> |
getFacets(Class<F> type)
|
boolean |
hasAllFacets(Class<? extends FACETTYPE>... facetDependencies)
Return true if all specified facetDependencies are present; return false otherwise.
|
boolean |
hasAllFacets(Iterable<Class<? extends FACETTYPE>> facetDependencies)
Return true if all specified facetDependencies are present; return false otherwise.
|
boolean |
hasFacet(Class<? extends FACETTYPE> type)
Return true if a facet of the given type is present; return false otherwise.
|
boolean |
install(FACETTYPE facet)
Install and register the given
Facet . |
boolean |
register(FACETTYPE facet)
Attempt to add the given
Facet in the internal registry. |
boolean |
uninstall(FACETTYPE facet)
Remove the given
Facet from the internal registry. |
boolean |
unregister(FACETTYPE facet)
Remove the given
Facet from the internal registry. |
public boolean hasFacet(Class<? extends FACETTYPE> type)
Faceted
public boolean hasAllFacets(Class<? extends FACETTYPE>... facetDependencies)
Faceted
hasAllFacets
in interface Faceted<FACETTYPE extends Facet<?>>
public boolean hasAllFacets(Iterable<Class<? extends FACETTYPE>> facetDependencies)
Faceted
hasAllFacets
in interface Faceted<FACETTYPE extends Facet<?>>
public <F extends FACETTYPE> F getFacet(Class<F> type) throws FacetNotFoundException
Faceted
Facet
type, or throw a FacetNotFoundException
if no
Facet
of that type is installed.getFacet
in interface Faceted<FACETTYPE extends Facet<?>>
FacetNotFoundException
public boolean install(FACETTYPE facet)
MutableFaceted
Facet
. If the facet is already installed, register it and return
true
. If the facet could not be installed, return false
;install
in interface MutableFaceted<FACETTYPE extends Facet<?>>
public boolean register(FACETTYPE facet)
MutableFaceted
Facet
in the internal registry. If Facet.isInstalled()
returns
true
, add it, otherwise return false
. If addition fails, return false
.register
in interface MutableFaceted<FACETTYPE extends Facet<?>>
public <F extends FACETTYPE> Iterable<F> getFacets(Class<F> type)
Faceted
public boolean uninstall(FACETTYPE facet)
MutableFaceted
Facet
from the internal registry.uninstall
in interface MutableFaceted<FACETTYPE extends Facet<?>>
public boolean unregister(FACETTYPE facet)
MutableFaceted
Facet
from the internal registry. If Facet.isInstalled()
returns
true
, do nothing and return false
. If removal fails, return false
.unregister
in interface MutableFaceted<FACETTYPE extends Facet<?>>
Copyright © 2014 JBoss by Red Hat. All rights reserved.