org.jomc.tools
Class JavaSources.JavaEditor

Package class diagram package JavaSources.JavaEditor
java.lang.Object
  extended by org.jomc.util.LineEditor
      extended by org.jomc.util.SectionEditor
          extended by org.jomc.tools.JavaSources.JavaEditor
Direct Known Subclasses:
JavaSources.JavaImplementationEditor, JavaSources.JavaSpecificationEditor
Enclosing class:
JavaSources

public abstract class JavaSources.JavaEditor
extends org.jomc.util.SectionEditor

Extension to SectionEditor for editing Java source code.

Version:
$Id: JavaSources.java 891 2009-11-02 03:40:00Z schulte2005 $
Author:
Christian Schulte

Constructor Summary
JavaSources.JavaEditor()
          Creates a new JavaEditor instance.
JavaSources.JavaEditor(org.jomc.util.LineEditor lineEditor)
          Creates a new JavaEditor instance taking a LineEditor to chain.
 
Method Summary
abstract  void editAnnotationsSection(org.jomc.util.Section s)
          Edits the annotations section of the source code of the editor.
abstract  void editDocumentationSection(org.jomc.util.Section s)
          Edits the documentation section of the source code of the editor.
abstract  void editLicenseSection(org.jomc.util.Section s)
          Edits the license section of the source code of the editor.
 void editSection(org.jomc.util.Section section)
           
 String getOutput(org.jomc.util.Section section)
           
 boolean isAnnotationsSectionPresent()
          Gets a flag indicating that the source code of the editor contains an annotations section.
 boolean isDocumentationSectionPresent()
          Gets a flag indicating that the source code of the editor contains a documentation section.
 boolean isLicenseSectionPresent()
          Gets a flag indicating that the source code of the editor contains a license section.
 
Methods inherited from class org.jomc.util.SectionEditor
editLine, getSection, isSectionFinished
 
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

JavaSources.JavaEditor

public JavaSources.JavaEditor()
Creates a new JavaEditor instance.


JavaSources.JavaEditor

public JavaSources.JavaEditor(org.jomc.util.LineEditor lineEditor)
Creates a new JavaEditor instance taking a LineEditor to chain.

Parameters:
lineEditor - The editor to chain.
Method Detail

getOutput

public String getOutput(org.jomc.util.Section section)
                 throws IOException
Overrides:
getOutput in class org.jomc.util.SectionEditor
Throws:
IOException

editSection

public void editSection(org.jomc.util.Section section)
                 throws IOException
Overrides:
editSection in class org.jomc.util.SectionEditor
Throws:
IOException

editLicenseSection

public abstract void editLicenseSection(org.jomc.util.Section s)
                                 throws IOException
Edits the license section of the source code of the editor.

Parameters:
s - The section to edit.
Throws:
NullPointerException - if s is null.
IOException - if editing s fails.

editAnnotationsSection

public abstract void editAnnotationsSection(org.jomc.util.Section s)
                                     throws IOException
Edits the annotations section of the source code of the editor.

Parameters:
s - The section to edit.
Throws:
NullPointerException - if s is null.
IOException - if editing s fails.

editDocumentationSection

public abstract void editDocumentationSection(org.jomc.util.Section s)
                                       throws IOException
Edits the documentation section of the source code of the editor.

Parameters:
s - The section to edit.
Throws:
NullPointerException - if s is null.
IOException - if editing s fails.

isLicenseSectionPresent

public boolean isLicenseSectionPresent()
Gets a flag indicating that the source code of the editor contains a license section.

Returns:
true if the source code of the editor contains a license section; false if the source code of the editor does not contain a license section.

isAnnotationsSectionPresent

public boolean isAnnotationsSectionPresent()
Gets a flag indicating that the source code of the editor contains an annotations section.

Returns:
true if the source code of the editor contains an annotations section; false if the source code of the editor does not contain an annotations section.

isDocumentationSectionPresent

public boolean isDocumentationSectionPresent()
Gets a flag indicating that the source code of the editor contains a documentation section.

Returns:
true if the source code of the editor contains a documentation section; false if the source code of the editor does not contain a documentation section.


Copyright © 2005-2009 The JOMC Project. All Rights Reserved.