|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.jomc.util.LineEditor
org.jomc.util.SectionEditor
org.jomc.tools.SourceFileProcessor.SourceFileEditor
public class SourceFileProcessor.SourceFileEditor extends org.jomc.util.SectionEditor
Extension to SectionEditor adding support for editing source code files.
| Constructor and Description |
|---|
SourceFileProcessor.SourceFileEditor(org.jomc.model.Implementation implementation)
Creates a new SourceFileEditor taking an Implementation to edit source code of. |
SourceFileProcessor.SourceFileEditor(org.jomc.model.Implementation implementation,
org.jomc.util.LineEditor lineEditor)
Creates a new SourceFileEditor taking an Implementation to edit source code of and an editor
to chain. |
SourceFileProcessor.SourceFileEditor(org.jomc.model.Implementation implementation,
org.jomc.util.LineEditor lineEditor,
String lineSeparator)
Creates a new SourceFileEditor taking an Implementation to edit source code of, an editor
to chain and a line separator. |
SourceFileProcessor.SourceFileEditor(org.jomc.model.Implementation implementation,
String lineSeparator)
Creates a new SourceFileEditor taking an Implementation to edit source code of and a line
separator. |
SourceFileProcessor.SourceFileEditor(org.jomc.model.Specification specification)
Creates a new SourceFileEditor taking a Specification to edit source code of. |
SourceFileProcessor.SourceFileEditor(org.jomc.model.Specification specification,
org.jomc.util.LineEditor lineEditor)
Creates a new SourceFileEditor taking a Specification to edit source code of and an editor to
chain. |
SourceFileProcessor.SourceFileEditor(org.jomc.model.Specification specification,
org.jomc.util.LineEditor lineEditor,
String lineSeparator)
Creates a new SourceFileEditor taking a Specification to edit source code of, an editor to
chain and a line separator. |
SourceFileProcessor.SourceFileEditor(org.jomc.model.Specification specification,
String lineSeparator)
Creates a new SourceFileEditor taking a Specification to edit source code of and a line
separator. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
editSection(org.jomc.util.Section s)
This method searches the model of the editor for a section matching s and updates properties
headContent and tailContent of s according to the templates declared in the model
as returned by method getSourceFileType. |
List<org.jomc.util.Section> |
getAddedSections()
Gets a list of sections added to the input. |
protected String |
getOutput(org.jomc.util.Section section)
This method creates any sections declared in the model of the editor as returned by method getSourceFileType prior to rendering the output of the editor. |
protected SourceFileType |
getSourceFileType()
Gets the model of the editor. |
List<org.jomc.util.Section> |
getUnknownSections()
Gets a list of sections without corresponding model entry. |
protected org.apache.velocity.VelocityContext |
getVelocityContext()
Gets the velocity context used for merging templates. |
| Methods inherited from class org.jomc.util.SectionEditor |
|---|
editLine, getSection, isSectionFinished, isSectionPresent |
| Methods inherited from class org.jomc.util.LineEditor |
|---|
edit, getLineSeparator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SourceFileProcessor.SourceFileEditor(org.jomc.model.Specification specification)
SourceFileEditor taking a Specification to edit source code of.
specification - The specification to edit source code of.
public SourceFileProcessor.SourceFileEditor(org.jomc.model.Specification specification,
String lineSeparator)
SourceFileEditor taking a Specification to edit source code of and a line
separator.
specification - The specification to edit source code of.lineSeparator - The line separator of the editor.
public SourceFileProcessor.SourceFileEditor(org.jomc.model.Specification specification,
org.jomc.util.LineEditor lineEditor)
SourceFileEditor taking a Specification to edit source code of and an editor to
chain.
specification - The specification backing the editor.lineEditor - The editor to chain.
public SourceFileProcessor.SourceFileEditor(org.jomc.model.Specification specification,
org.jomc.util.LineEditor lineEditor,
String lineSeparator)
SourceFileEditor taking a Specification to edit source code of, an editor to
chain and a line separator.
specification - The specification backing the editor.lineEditor - The editor to chain.lineSeparator - The line separator of the editor.public SourceFileProcessor.SourceFileEditor(org.jomc.model.Implementation implementation)
SourceFileEditor taking an Implementation to edit source code of.
implementation - The implementation to edit source code of.
public SourceFileProcessor.SourceFileEditor(org.jomc.model.Implementation implementation,
String lineSeparator)
SourceFileEditor taking an Implementation to edit source code of and a line
separator.
implementation - The implementation to edit source code of.lineSeparator - The line separator of the editor.
public SourceFileProcessor.SourceFileEditor(org.jomc.model.Implementation implementation,
org.jomc.util.LineEditor lineEditor)
SourceFileEditor taking an Implementation to edit source code of and an editor
to chain.
implementation - The implementation to edit source code of.lineEditor - The editor to chain.
public SourceFileProcessor.SourceFileEditor(org.jomc.model.Implementation implementation,
org.jomc.util.LineEditor lineEditor,
String lineSeparator)
SourceFileEditor taking an Implementation to edit source code of, an editor
to chain and a line separator.
implementation - The implementation to edit source code of.lineEditor - The editor to chain.lineSeparator - The line separator of the editor.| Method Detail |
|---|
public List<org.jomc.util.Section> getAddedSections()
public List<org.jomc.util.Section> getUnknownSections()
protected SourceFileType getSourceFileType()
protected org.apache.velocity.VelocityContext getVelocityContext()
protected String getOutput(org.jomc.util.Section section)
throws IOException
This method creates any sections declared in the model of the editor as returned by method
getSourceFileType prior to rendering the output of the editor.
getOutput in class org.jomc.util.SectionEditorsection - The section to start rendering the editor's output with.IOExceptiongetSourceFileType()
protected void editSection(org.jomc.util.Section s)
throws IOException
This method searches the model of the editor for a section matching s and updates properties
headContent and tailContent of s according to the templates declared in the model
as returned by method getSourceFileType.
editSection in class org.jomc.util.SectionEditors - The section to edit.IOExceptiongetSourceFileType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||