org.javagen.agile.core.emitter.binding
Class ModelTypeBinder
java.lang.Object
org.javagen.agile.core.emitter.binding.ModelTypeBinder
- All Implemented Interfaces:
- Binder
public class ModelTypeBinder
- extends Object
- implements Binder
Binds Emitters to model instances based on Model's modelType
property. Emitters are mapped to modelTypes using a Map.
- Author:
- Richard Easterling
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EMPTY_EMITTER_SET
static final Set<Emitter> EMPTY_EMITTER_SET
emitterBindings
Map<String,Set<Emitter>> emitterBindings
ModelTypeBinder
public ModelTypeBinder()
boundEmitters
public Set<Emitter> boundEmitters(Model modelNode)
- Description copied from interface:
Binder
- Determine the registered emitters for a given model type. Typicaly called
by
EmitterVisitor durring template invocation.
- Specified by:
boundEmitters in interface Binder
- Parameters:
modelNode - current Model instance to process.
- Returns:
- set of emitters to be invoked for provided model instance.
bindEmitter
public void bindEmitter(String modelType,
Emitter emitter)
boundEmitters
public Set<Emitter> boundEmitters(String modelType)
getEmitterBindings
public Map<String,Set<Emitter>> getEmitterBindings()
setEmitterBindings
public void setEmitterBindings(Map<String,Set<Emitter>> emitterCache)
Copyright 2006-2006-2007 Outsource Cafe Inc.. All Rights Reserved.