public class ProgramCodeGeneratorAdapter extends CodeGeneratorAdapter
Red (rodiers) |
Red (rodiers) |
Modifier and Type | Class and Description |
---|---|
static class |
ProgramCodeGeneratorAdapter.Channel
A class that defines a channel object.
|
NamedObj.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object |
_component
The associated component.
|
protected static java.lang.String[] |
_defaultBlocks
The code block table that stores the code block body (StringBuffer)
with the code block name (String) as key.
|
protected static java.lang.String |
_eol
End of line character.
|
protected TemplateParser |
_templateParser
The strategy for generating code for this adapter.
|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
ProgramCodeGeneratorAdapter(java.lang.Object component)
Construct the code generator adapter associated
with the given component.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
_generateBlockByName(java.lang.String blockName)
Generate code for a given block.
|
ProgramCodeGeneratorAdapter |
getAdapter(java.lang.Object component)
Get the code generator adapter associated with the given component.
|
ProgramCodeGenerator |
getCodeGenerator()
Get the code generator associated with this adapter class.
|
java.lang.Object |
getComponent()
Get the component associated with this adapter.
|
TemplateParser |
getTemplateParser()
Get the template parser associated with this strategy.
|
java.lang.String |
processCode(java.lang.String code)
Process the specified code, replacing macros with their values.
|
void |
setCodeGenerator(GenericCodeGenerator codeGenerator)
Set the code generator associated with this adapter class.
|
void |
setTemplateParser(TemplateParser templateParser)
Set the template parser for this adapter.
|
java.lang.String |
toString()
Return the class name and the full name of the object,
with syntax "className {fullName}".
|
createDecoratorAttributes, generateName
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getContainedObject, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateExistence, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getContainer, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setName, setPersistent, setSource, sortContainedObjects, toplevel, uniqueName, validateSettables, workspace
protected java.lang.Object _component
protected static final java.lang.String[] _defaultBlocks
protected static final java.lang.String _eol
protected TemplateParser _templateParser
public ProgramCodeGeneratorAdapter(java.lang.Object component)
component
- The associated component.public final ProgramCodeGeneratorAdapter getAdapter(java.lang.Object component) throws IllegalActionException
component
- The given component.IllegalActionException
- If the adapter class cannot be found.public ProgramCodeGenerator getCodeGenerator()
getCodeGenerator
in class CodeGeneratorAdapter
setCodeGenerator(GenericCodeGenerator)
public java.lang.Object getComponent()
public final java.lang.String processCode(java.lang.String code) throws IllegalActionException
code
- The code to process.IllegalActionException
- If illegal macro names are found.public final void setTemplateParser(TemplateParser templateParser)
templateParser
- The template parser.getTemplateParser()
public void setCodeGenerator(GenericCodeGenerator codeGenerator)
setCodeGenerator
in class CodeGeneratorAdapter
codeGenerator
- The code generator associated with this
adapter class.getCodeGenerator()
public final TemplateParser getTemplateParser()
setTemplateParser(TemplateParser)
public java.lang.String toString()
NamedObj
protected java.lang.String _generateBlockByName(java.lang.String blockName) throws IllegalActionException
blockName
- The name of the block, which usually ends
with the string "Block".IllegalActionException
- If thrown while appending to the
the block or processing the macros.