org.jomc.tools
Class JavaSources

Package class diagram package JavaSources
java.lang.Object
  extended by org.jomc.tools.JomcTool
      extended by org.jomc.tools.JavaSources

public class JavaSources
extends JomcTool

Manages Java source code.

Use cases

Version:
$Id: JavaSources.java 891 2009-11-02 03:40:00Z schulte2005 $
Author:
Christian Schulte
See Also:
JomcTool.getModules()

Nested Class Summary
 class JavaSources.JavaEditor
          Extension to SectionEditor for editing Java source code.
 class JavaSources.JavaImplementationEditor
          Extension to JavaEditor for editing implementation source code.
 class JavaSources.JavaSpecificationEditor
          Extension to JavaEditor for editing specification source code.
 
Nested classes/interfaces inherited from class org.jomc.tools.JomcTool
JomcTool.Listener
 
Constructor Summary
JavaSources()
          Creates a new JavaSources instance.
JavaSources(JavaSources tool)
          Creates a new JavaSources instance taking a JavaSources instance to initialize the instance with.
 
Method Summary
 JavaSources.JavaImplementationEditor getImplementationEditor(org.jomc.model.Implementation implementation)
          Gets a new editor for editing Java implementation source code.
 JavaSources.JavaSpecificationEditor getSpecificationEditor(org.jomc.model.Specification specification)
          Gets a new editor for editing Java specification source code.
 org.apache.velocity.VelocityContext getVelocityContext()
          Gets the velocity context used for merging templates.
 void manageSources(File sourcesDirectory)
          Manages the source code of the modules of the instance.
 void manageSources(org.jomc.model.Implementation implementation, File sourcesDirectory)
          Manages the source code of a given implementation of the modules of the instance.
 void manageSources(org.jomc.model.Module module, File sourcesDirectory)
          Manages the source code of a given module of the modules of the instance.
 void manageSources(org.jomc.model.Specification specification, File sourcesDirectory)
          Manages the source code of a given specification of the modules of the instance.
 
Methods inherited from class org.jomc.tools.JomcTool
getDefaultLogLevel, getDisplayLanguage, getInputEncoding, getJavaClasspathLocation, getJavaClasspathLocation, getJavadocComment, getJavaGetterMethodName, getJavaGetterMethodName, getJavaGetterMethodName, getJavaInterfaceNames, getJavaModifierName, getJavaModifierName, getJavaModifierName, getJavaPackageName, getJavaPackageName, getJavaPackageName, getJavaString, getJavaTypeName, getJavaTypeName, getJavaTypeName, getJavaTypeName, getJavaTypeName, getJavaTypeName, getListeners, getLogLevel, getLongDate, getLongDateTime, getLongTime, getModules, getOutputEncoding, getProfile, getShortDate, getShortDateTime, getShortTime, getTemplateEncoding, getVelocityEngine, getVelocityTemplate, getYears, isJavaClassDeclaration, isJavaClassDeclaration, isJavaDefaultPackage, isJavaDefaultPackage, isJavaPrimitiveType, isLoggable, log, setDefaultLogLevel, setInputEncoding, setLogLevel, setModules, setOutputEncoding, setProfile, setTemplateEncoding, setVelocityEngine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaSources

public JavaSources()
Creates a new JavaSources instance.


JavaSources

public JavaSources(JavaSources tool)
Creates a new JavaSources instance taking a JavaSources instance to initialize the instance with.

Parameters:
tool - The instance to initialize the new instance with,
Method Detail

manageSources

public void manageSources(File sourcesDirectory)
                   throws IOException
Manages the source code of the modules of the instance.

Parameters:
sourcesDirectory - The directory holding the sources to manage.
Throws:
NullPointerException - if sourcesDirectory is null.
IOException - if managing sources fails.
See Also:
manageSources(org.jomc.model.Module, java.io.File)

manageSources

public void manageSources(org.jomc.model.Module module,
                          File sourcesDirectory)
                   throws IOException
Manages the source code of a given module of the modules of the instance.

Parameters:
module - The module to process.
sourcesDirectory - The directory holding the sources to manage.
Throws:
NullPointerException - if module or sourcesDirectory is null.
IOException - if managing sources fails.
See Also:
manageSources(org.jomc.model.Specification, java.io.File), manageSources(org.jomc.model.Implementation, java.io.File)

manageSources

public void manageSources(org.jomc.model.Specification specification,
                          File sourcesDirectory)
                   throws IOException
Manages the source code of a given specification of the modules of the instance.

Parameters:
specification - The specification to process.
sourcesDirectory - The directory holding the sources to manage.
Throws:
NullPointerException - if specification or sourcesDirectory is null.
IOException - if managing sources fails.
See Also:
getSpecificationEditor(org.jomc.model.Specification)

manageSources

public void manageSources(org.jomc.model.Implementation implementation,
                          File sourcesDirectory)
                   throws IOException
Manages the source code of a given implementation of the modules of the instance.

Parameters:
implementation - The implementation to process.
sourcesDirectory - The directory holding the sources to manage.
Throws:
NullPointerException - if implementation or sourcesDirectory is null.
IOException - if managing sources fails.
See Also:
getImplementationEditor(org.jomc.model.Implementation)

getSpecificationEditor

public JavaSources.JavaSpecificationEditor getSpecificationEditor(org.jomc.model.Specification specification)
Gets a new editor for editing Java specification source code.

Parameters:
specification - The specification to create a new editor for.
Returns:
A new editor for editing the source code of specification.
Throws:
NullPointerException - if specification is null.

getImplementationEditor

public JavaSources.JavaImplementationEditor getImplementationEditor(org.jomc.model.Implementation implementation)
Gets a new editor for editing Java implementation source code.

Parameters:
implementation - The implementation to create a new editor for.
Returns:
A new editor for editing the source code of implementation.
Throws:
NullPointerException - if implementation is null.

getVelocityContext

public org.apache.velocity.VelocityContext getVelocityContext()
Gets the velocity context used for merging templates.

Overrides:
getVelocityContext in class JomcTool
Returns:
The velocity context used for merging templates.


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