org.acmsl.antmake
Class TopMakefileAmTemplate

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

public abstract class TopMakefileAmTemplate
extends java.lang.Object

Template to generate top-level Makefile.am files.

Version:
$Revision: 1.3 $
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_JAR_DEPS_SUBTEMPLATE
          The default jar deps subtemplate.
 
Constructor Summary
TopMakefileAmTemplate(java.lang.String projectName)
          Builds a TopMakefileAmTemplate using given information.
TopMakefileAmTemplate(java.lang.String header, java.lang.String body, java.lang.String jarDepsSubtemplate, java.lang.String projectName)
          Builds a TopMakefileAmTemplate 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 addLeafFolder(java.lang.String folder)
          Adds a leaf-level folder.
 void addPackage(java.lang.String concretePackage)
          Adds a package.
 void addTopFolder(java.lang.String folder)
          Adds a top-level folder.
 java.lang.String getBody()
          Retrieves the body.
 java.lang.String getHeader()
          Retrieves the header.
 java.lang.String getJarDepsSubtemplate()
          Retrieves the JAR_DEPS subtemplate.
protected  java.util.Collection getLeafFolders()
          Retrieves the leaf folders.
protected  java.util.Collection getPackages()
          Retrieves the packages.
 java.lang.String getProjectName()
          Retrieves the project name.
protected  java.util.Collection getTopFolders()
          Retrieves the top-level folders.
protected  void setBody(java.lang.String body)
          Specifies the body.
protected  void setHeader(java.lang.String header)
          Specifies the header.
protected  void setJarDepsSubtemplate(java.lang.String jarDepsSubtemplate)
          Specifies the JAR_DEPS subtemplate.
protected  void setLeafFolders(java.util.Collection folders)
          Specifies the leaf folders.
protected  void setPackages(java.util.Collection packages)
          Specifies the packages.
protected  void setProjectName(java.lang.String projectName)
          Specifies the project name.
protected  void setTopFolders(java.util.Collection folders)
          Specifies the top-level folders.
 java.lang.String toString()
          Retrieves the weaved top-level 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_JAR_DEPS_SUBTEMPLATE

public static final java.lang.String DEFAULT_JAR_DEPS_SUBTEMPLATE
The default jar deps subtemplate.

See Also:
Constant Field Values
Constructor Detail

TopMakefileAmTemplate

public TopMakefileAmTemplate(java.lang.String header,
                             java.lang.String body,
                             java.lang.String jarDepsSubtemplate,
                             java.lang.String projectName)
Builds a TopMakefileAmTemplate using given information.

Parameters:
header - the header.
body - the body.
jarDepsSubtemplate - the JAR_DEPS subtemplate.
projectName - the project name.

TopMakefileAmTemplate

public TopMakefileAmTemplate(java.lang.String projectName)
Builds a TopMakefileAmTemplate using given information.

Parameters:
projectName - the project 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.

setJarDepsSubtemplate

protected void setJarDepsSubtemplate(java.lang.String jarDepsSubtemplate)
Specifies the JAR_DEPS subtemplate.

Parameters:
jarDepsSubtemplate - the new subtemplate.

getJarDepsSubtemplate

public java.lang.String getJarDepsSubtemplate()
Retrieves the JAR_DEPS 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.

setTopFolders

protected void setTopFolders(java.util.Collection folders)
Specifies the top-level folders.

Parameters:
folders - the folder list.

getTopFolders

protected java.util.Collection getTopFolders()
Retrieves the top-level folders.

Returns:
such collection.

addTopFolder

public void addTopFolder(java.lang.String folder)
Adds a top-level folder.

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

setLeafFolders

protected void setLeafFolders(java.util.Collection folders)
Specifies the leaf folders.

Parameters:
folders - the folder list.

getLeafFolders

protected java.util.Collection getLeafFolders()
Retrieves the leaf folders.

Returns:
such collection.

addLeafFolder

public void addLeafFolder(java.lang.String folder)
Adds a leaf-level folder.

Parameters:
folder - the leaf folder to add.

setPackages

protected void setPackages(java.util.Collection packages)
Specifies the packages.

Parameters:
packages - the package list.

getPackages

protected java.util.Collection getPackages()
Retrieves the packages.

Returns:
such collection.

addPackage

public void addPackage(java.lang.String concretePackage)
Adds a package.

Parameters:
concretePackage - the package 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 top-level Makefile.am file contents.

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


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