public abstract class SyntacticCodeGeneratorAdapter extends CodeGeneratorAdapter
Subclasses should override generateSyntax().
Subclasses should be sure to properly indent the code by
either using the code block functionality in methods like
_generateBlockCode(String) or by calling
CodeStream.indent(String)
,
for example:
StringBuffer code = new StringBuffer(); code.append(super.generateWrapupCode()); code.append("// Local wrapup code"); return processCode(CodeStream.indent(code.toString()));
NamedObj.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected GenericCodeGenerator |
_codeGenerator
The code generator that contains this adapter class.
|
protected static java.lang.String |
_eol
End of line character.
|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
SyntacticCodeGeneratorAdapter(NamedObj component)
Construct the code generator adapter associated
with the given component.
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
generateSyntax()
Generate syntactic representation code.
|
GenericCodeGenerator |
getCodeGenerator()
Get the code generator associated with this adapter class.
|
NamedObj |
getComponent()
Get the component associated with this adapter.
|
void |
setCodeGenerator(GenericCodeGenerator codeGenerator)
Set the code generator associated with this adapter class.
|
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, toString, uniqueName, validateSettables, workspace
protected static final java.lang.String _eol
protected GenericCodeGenerator _codeGenerator
public SyntacticCodeGeneratorAdapter(NamedObj component)
component
- The associated component.public abstract java.lang.String generateSyntax() throws IllegalActionException
IllegalActionException
- If there is a problem
reading data from the model while generating HTML.public GenericCodeGenerator getCodeGenerator()
getCodeGenerator
in class CodeGeneratorAdapter
setCodeGenerator(GenericCodeGenerator)
public NamedObj getComponent()
public void setCodeGenerator(GenericCodeGenerator codeGenerator)
setCodeGenerator
in class CodeGeneratorAdapter
codeGenerator
- The code generator associated with this
adapter class.getCodeGenerator()