C
- the class type of the subclass@SkipAnnotation(value=false) public abstract class AbstractBehavioredComponent<C extends BehavioredComponent<C>> extends AbstractComponent<C> implements BehavioredComponent<C>, LinkMessages
Component
.
This is the base class for all EnhancedComponent that want to use Behavior features.innerComponentMap, PROCESS_WAVE_METHOD_NAME, rootComponent
ADD_BEHAVIOR, CALL_ANNOTATED_METHOD_ERROR, COMMAND_NOT_FOUND_ERROR, COMMAND_NOT_FOUND_MESSAGE, COMPONENT_INJECTION_FAILURE, COMPONENT_RELEASE_ERROR, CUSTOM_METHOD_NOT_FOUND, LISTEN_WAVE_TYPE, MODEL_NOT_FOUND_ERROR, MODEL_NOT_FOUND_MESSAGE, NO_WAVE_LISTENER, NOTIFIER_CONSUMES, NOTIFIER_HANDLES, SEND_WAVE, SERVICE_NOT_FOUND_ERROR, SERVICE_NOT_FOUND_MESSAGE, UNLISTEN_WAVE_TYPE, WAVE_BEAN_CREATION_ERROR, WAVE_DISPATCH_ERROR, WAVE_HANDLING_ERROR, WAVE_LOST, WAVE_LOST_CONTEXT, WAVE_SENDING_ERROR
booleanItem, byteItem, characterItem, classItem, doubleItem, exceptionItem, floatItem, integerItem, longItem, shortItem, stringItem, voidItem
Constructor and Description |
---|
AbstractBehavioredComponent() |
Modifier and Type | Method and Description |
---|---|
<BD extends BehaviorData> |
addBehavior(BD data)
Add a behavior to the component by providing a
BehaviorData . |
<BD extends BehaviorData,B extends Behavior<BD,?>> |
addBehavior(Class<B> behaviorClass)
Add a behavior to the component by providing the
Behavior class. |
<BD extends BehaviorData,B extends Behavior<BD,?>> |
getBehavior(Class<B> behaviorClass)
Return the
Behavior instance created for the given Behavior type. |
<BD extends BehaviorData,B extends Behavior<BD,?>> |
getBehaviorData(Class<B> behaviorClass)
Return the
BehaviorData used by the given Behavior type. |
boolean |
hasBehavior(Class<Behavior<?,?>> behaviorClass)
Return true if the component contains the
Behavior class provided. |
protected void |
manageOptionalData() |
attachUi, callCommand, callCommand, findInnerComponent, getInnerComponentMap, initInnerComponents, initInternalInnerComponents, listen, listen, listen, processWave, ready, release, returnData, rootComponent, rootComponent, sendWave, sendWave, sendWave, setup, unlisten
getCommand, getCommand, getCommands, getCommands, getFirstKeyPart, getKeyPart, getListKeyPart, getModel, getModel, getModels, getModels, getSecondKeyPart, getService, getService, getServices, getServices, getThirdKeyPart, key, key, localFacade, localFacade
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findInnerComponent, listen, listen, listen, rootComponent, rootComponent, sendWave, sendWave, sendWave, unlisten
key, key, localFacade, localFacade, release, setup
attachUi, getModel, getModel, getModels, getModels
getService, getService, getServices, getServices, returnData
callCommand, callCommand, getCommand, getCommand, getCommands, getCommands
public AbstractBehavioredComponent()
protected void manageOptionalData()
manageOptionalData
in class AbstractComponent<C extends BehavioredComponent<C>>
public boolean hasBehavior(Class<Behavior<?,?>> behaviorClass)
Behavior
class provided.hasBehavior
in interface BehavioredComponent<C extends BehavioredComponent<C>>
behaviorClass
- the class of the Behavior
to checkpublic <BD extends BehaviorData,B extends Behavior<BD,?>> C addBehavior(Class<B> behaviorClass)
Behavior
class.addBehavior
in interface BehavioredComponent<C extends BehavioredComponent<C>>
behaviorClass
- the class of the behavior to addpublic <BD extends BehaviorData> C addBehavior(BD data)
BehaviorData
.
The BehaviorData allow to add several Behavior
if many of them rare reference by the BehaviorData.addBehavior
in interface BehavioredComponent<C extends BehavioredComponent<C>>
data
- the Behavior Data that references Behavior classes to addpublic <BD extends BehaviorData,B extends Behavior<BD,?>> B getBehavior(Class<B> behaviorClass)
Behavior
instance created for the given Behavior type.getBehavior
in interface BehavioredComponent<C extends BehavioredComponent<C>>
behaviorClass
- the Behavior type to getpublic <BD extends BehaviorData,B extends Behavior<BD,?>> BD getBehaviorData(Class<B> behaviorClass)
BehaviorData
used by the given Behavior type.getBehaviorData
in interface BehavioredComponent<C extends BehavioredComponent<C>>
behaviorClass
- the Behavior type that use the searched dataCopyright © 2011–2016 JRebirth OSS. All rights reserved.