|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ComponentModel
Defines a component in terms of its capabilities, parameters, sub-components, etc. During runtime, the component model is immutable. During construction time, when the class is being transformed and loaded, the model is mutable.
MutableComponentModel
Method Summary | |
---|---|
Resource |
getBaseResource()
Returns the resource corresponding to the class file for this component. |
String |
getComponentClassName()
The fully qualified class name of the component. |
List<String> |
getDeclaredParameterNames()
Returns an alphabetically sorted list of the names of all formal parameters defined by this specific class (parameters inherited from base classes are not identified). |
List<String> |
getEmbeddedComponentIds()
Returns the ids of all embedded components defined within the component class (via the Component annotation), including those defined by any super-class. |
EmbeddedComponentModel |
getEmbeddedComponentModel(String componentId)
Returns an embedded component defined by this component or by a super-class. |
String |
getFieldPersistenceStrategy(String fieldName)
Returns the persistent strategy associated with the field. |
Set<Class> |
getHandledRenderPhases()
Returns a set of all the render phases that this model (including parent models) that are handled. |
org.slf4j.Logger |
getLogger()
Returns object that will be used to log warnings and errors related to this component. |
String |
getMeta(String key)
Gets a meta value identified by the given key. |
List<String> |
getMixinClassNames()
Returns a list of the class names of mixins that are part of the component's implementation. |
String[] |
getOrderForMixin(String mixinClassName)
|
ParameterModel |
getParameterModel(String parameterName)
Return a single parameter model by parameter name, or null if the parameter is not defined (is not a formal parameter). |
List<String> |
getParameterNames()
Returns an alphabetically sorted list of the names of all formal parameters. |
ComponentModel |
getParentModel()
Returns the component model for this component's super-class, if it exists. |
List<String> |
getPersistentFieldNames()
Returns a list of the names of all persistent fields (within this class, or any super-class). |
boolean |
getSupportsInformalParameters()
Returns true if the model indicates that informal parameters, additional parameters beyond the formal parameter defined for the component, are supported. |
boolean |
handlesEvent(String eventType)
Determines if the component has an event handler for the indicated event name (case insensitive). |
boolean |
isFormalParameter(String parameterName)
Returns true if the named parameter is formally defined (there's a ParameterModel). |
boolean |
isMixinAfter()
Relevant for component mixins only. |
boolean |
isPage()
Is this a model of a page (rather than a component, mixin, or base-class)? |
boolean |
isRootClass()
Returns true if the modeled component is a root class, a component class whose parent class is not a component class. |
Method Detail |
---|
boolean isPage()
Resource getBaseResource()
String getComponentClassName()
List<String> getEmbeddedComponentIds()
Component
annotation), including those defined by any super-class.
EmbeddedComponentModel getEmbeddedComponentModel(String componentId)
componentId
- the id of the embedded component
String getFieldPersistenceStrategy(String fieldName)
fieldName
-
IllegalArgumentException
- if the named field is not marked as persistentorg.slf4j.Logger getLogger()
Log
List<String> getMixinClassNames()
ParameterModel getParameterModel(String parameterName)
parameterName
- the name of the parameter (case is ignored)
boolean isFormalParameter(String parameterName)
parameterName
- name of the parameter (case is ignored)List<String> getParameterNames()
List<String> getDeclaredParameterNames()
List<String> getPersistentFieldNames()
Persist
boolean isRootClass()
boolean getSupportsInformalParameters()
SupportsInformalParameters
annotation is present, or inherited from a super-class).
ComponentModel getParentModel()
boolean isMixinAfter()
MixinAfter
annotation.
String getMeta(String key)
key
- identifies the value to be accessed
Set<Class> getHandledRenderPhases()
BeginRender
, AfterRender
, etc.).
boolean handlesEvent(String eventType)
eventType
- name of event to check (case insensitive)
String[] getOrderForMixin(String mixinClassName)
mixinClassName
- class name of the mixin for which the ordering is desired
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |