org.acmsl.antmake
Class MakefileAmTemplate

java.lang.Object
  |
  +--org.acmsl.antmake.MakefileAmTemplate

public abstract class MakefileAmTemplate
extends java.lang.Object

Template to generate Makefile.am files for Java folders.

Version:
$Revision: 1.2 $
Author:
Jose San Leandro

Field Summary
static java.lang.String DEFAULT_BODY
          The default Make-Rules body.
static java.lang.String DEFAULT_HEADER
          The default header.
static java.lang.String DEFAULT_JAVA_SOURCE_SUBTEMPLATE
          The default java source subtemplate.
static java.lang.String DEFAULT_JAVA_SOURCES_SUBTEMPLATE
          The default java sources subtemplate.
static java.lang.String DEFAULT_SUBDIRS_SUBTEMPLATE
          The default SUBDIRS subtemplate.
 
Constructor Summary
MakefileAmTemplate(java.lang.String projectName, java.lang.String packageName)
          Builds a MakefileAmTemplate using given information.
MakefileAmTemplate(java.lang.String header, java.lang.String body, java.lang.String subdirsSubtemplate, java.lang.String javaSourcesSubtemplate, java.lang.String javaSourceSubtemplate, java.lang.String projectName, java.lang.String packageName)
          Builds a MakefileAmTemplate using given information.
 
Method Summary
protected  java.util.Collection add(java.util.Collection container, java.lang.String item)
          Adds an item to given collection..
 void addFolder(java.lang.String folder)
          Adds a first-level folder.
 void addSourceFile(java.lang.String file)
          Adds a source file.
 java.lang.String getBody()
          Retrieves the body.
protected  java.util.Collection getFolders()
          Retrieves the first-level folders.
 java.lang.String getHeader()
          Retrieves the header.
 java.lang.String getJavaSourcesSubtemplate()
          Retrieves the java_sources subtemplate.
 java.lang.String getJavaSourceSubtemplate()
          Retrieves the Java source subtemplate.
 java.lang.String getPackageName()
          Retrieves the package name.
 java.lang.String getProjectName()
          Retrieves the project name.
protected  java.util.Collection getSourceFiles()
          Retrieves the source files.
 java.lang.String getSubdirsSubtemplate()
          Retrieves the SUBDIRS subtemplate.
protected  void setBody(java.lang.String body)
          Specifies the body.
protected  void setFolders(java.util.Collection folders)
          Specifies the first-level folders.
protected  void setHeader(java.lang.String header)
          Specifies the header.
protected  void setJavaSourcesSubtemplate(java.lang.String javaSourcesSubtemplate)
          Specifies the java_sources subtemplate.
protected  void setJavaSourceSubtemplate(java.lang.String javaSourceSubtemplate)
          Specifies the Java source subtemplate.
protected  void setPackageName(java.lang.String packageName)
          Specifies the package name.
protected  void setProjectName(java.lang.String projectName)
          Specifies the project name.
protected  void setSourceFiles(java.util.Collection files)
          Specifies the source files.
protected  void setSubdirsSubtemplate(java.lang.String subdirsSubtemplate)
          Specifies the SUBDIRS subtemplate.
 java.lang.String toString()
          Retrieves the weaved Makefile.am file contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_HEADER

public static final java.lang.String DEFAULT_HEADER
The default header.

See Also:
Constant Field Values

DEFAULT_BODY

public static final java.lang.String DEFAULT_BODY
The default Make-Rules body.

See Also:
Constant Field Values

DEFAULT_SUBDIRS_SUBTEMPLATE

public static final java.lang.String DEFAULT_SUBDIRS_SUBTEMPLATE
The default SUBDIRS subtemplate.

See Also:
Constant Field Values

DEFAULT_JAVA_SOURCES_SUBTEMPLATE

public static final java.lang.String DEFAULT_JAVA_SOURCES_SUBTEMPLATE
The default java sources subtemplate.

See Also:
Constant Field Values

DEFAULT_JAVA_SOURCE_SUBTEMPLATE

public static final java.lang.String DEFAULT_JAVA_SOURCE_SUBTEMPLATE
The default java source subtemplate.

See Also:
Constant Field Values
Constructor Detail

MakefileAmTemplate

public MakefileAmTemplate(java.lang.String header,
                          java.lang.String body,
                          java.lang.String subdirsSubtemplate,
                          java.lang.String javaSourcesSubtemplate,
                          java.lang.String javaSourceSubtemplate,
                          java.lang.String projectName,
                          java.lang.String packageName)
Builds a MakefileAmTemplate using given information.

Parameters:
header - the header.
body - the body.
projectName - the project name.
packageName - the package name.

MakefileAmTemplate

public MakefileAmTemplate(java.lang.String projectName,
                          java.lang.String packageName)
Builds a MakefileAmTemplate using given information.

Parameters:
projectName - the project name.
packageName - the package name.
Method Detail

setHeader

protected void setHeader(java.lang.String header)
Specifies the header.

Parameters:
header - the new header.

getHeader

public java.lang.String getHeader()
Retrieves the header.

Returns:
such information.

setBody

protected void setBody(java.lang.String body)
Specifies the body.

Parameters:
body - the new body.

getBody

public java.lang.String getBody()
Retrieves the body.

Returns:
such information.

setSubdirsSubtemplate

protected void setSubdirsSubtemplate(java.lang.String subdirsSubtemplate)
Specifies the SUBDIRS subtemplate.

Parameters:
subdirsSubtemplate - the new subtemplate.

getSubdirsSubtemplate

public java.lang.String getSubdirsSubtemplate()
Retrieves the SUBDIRS subtemplate.

Returns:
such information.

setJavaSourcesSubtemplate

protected void setJavaSourcesSubtemplate(java.lang.String javaSourcesSubtemplate)
Specifies the java_sources subtemplate.

Parameters:
javaSourcesSubtemplate - the new subtemplate.

getJavaSourcesSubtemplate

public java.lang.String getJavaSourcesSubtemplate()
Retrieves the java_sources subtemplate.

Returns:
such information.

setJavaSourceSubtemplate

protected void setJavaSourceSubtemplate(java.lang.String javaSourceSubtemplate)
Specifies the Java source subtemplate.

Parameters:
javaSourceSubtemplate - the new subtemplate.

getJavaSourceSubtemplate

public java.lang.String getJavaSourceSubtemplate()
Retrieves the Java source subtemplate.

Returns:
such information.

setProjectName

protected void setProjectName(java.lang.String projectName)
Specifies the project name.

Parameters:
projectName - the new project name.

getProjectName

public java.lang.String getProjectName()
Retrieves the project name.

Returns:
such information.

setPackageName

protected void setPackageName(java.lang.String packageName)
Specifies the package name.

Parameters:
packageName - the new package name.

getPackageName

public java.lang.String getPackageName()
Retrieves the package name.

Returns:
such information.

setFolders

protected void setFolders(java.util.Collection folders)
Specifies the first-level folders.

Parameters:
folders - the folder list.

getFolders

protected java.util.Collection getFolders()
Retrieves the first-level folders.

Returns:
such collection.

addFolder

public void addFolder(java.lang.String folder)
Adds a first-level folder.

Parameters:
folder - the first-level folder to add.

setSourceFiles

protected void setSourceFiles(java.util.Collection files)
Specifies the source files.

Parameters:
files - the file list.

getSourceFiles

protected java.util.Collection getSourceFiles()
Retrieves the source files.

Returns:
such collection.

addSourceFile

public void addSourceFile(java.lang.String file)
Adds a source file.

Parameters:
file - the source file to add.

add

protected java.util.Collection add(java.util.Collection container,
                                   java.lang.String item)
Adds an item to given collection..

Parameters:
container - the collection.
item - the item to add.
Returns:
the given collection, or a newly-created one if container was null.

toString

public java.lang.String toString()
Retrieves the weaved Makefile.am file contents.

Overrides:
toString in class java.lang.Object
Returns:
such contents.


Copyright © 2004 ACM S.L.. All Rights Reserved.