org.acmsl.antmake
Class MakefileAmTemplateGenerator

java.lang.Object
  |
  +--org.acmsl.antmake.MakefileAmTemplateGenerator
All Implemented Interfaces:
MakefileAmTemplateFactory

public class MakefileAmTemplateGenerator
extends java.lang.Object
implements MakefileAmTemplateFactory

Is able to generate Makefile.am templates for Java folders.

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

Constructor Summary
protected MakefileAmTemplateGenerator()
          Protected constructor to avoid accidental instantiation.
 
Method Summary
 MakefileAmTemplate createMakefileAmTemplate(java.lang.String projectName, java.lang.String packageName)
          Generates a Makefile.am template for given Java package.
static MakefileAmTemplateGenerator getInstance()
          Retrieves a MakefileAmTemplateGenerator instance.
protected static java.lang.ref.WeakReference getReference()
          Retrieves the weak reference.
protected static void setReference(MakefileAmTemplateGenerator generator)
          Specifies a new weak reference.
 void write(MakefileAmTemplate template, java.io.File outputDir, org.apache.tools.ant.Task task)
          Writes a Java folder's Makefile.am file to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MakefileAmTemplateGenerator

protected MakefileAmTemplateGenerator()
Protected constructor to avoid accidental instantiation.

Method Detail

setReference

protected static void setReference(MakefileAmTemplateGenerator generator)
Specifies a new weak reference.

Parameters:
generator - the generator instance to use.

getReference

protected static java.lang.ref.WeakReference getReference()
Retrieves the weak reference.

Returns:
such reference.

getInstance

public static MakefileAmTemplateGenerator getInstance()
Retrieves a MakefileAmTemplateGenerator instance.

Returns:
such instance.

createMakefileAmTemplate

public MakefileAmTemplate createMakefileAmTemplate(java.lang.String projectName,
                                                   java.lang.String packageName)
Generates a Makefile.am template for given Java package.

Specified by:
createMakefileAmTemplate in interface MakefileAmTemplateFactory
Parameters:
projectName - the project name.b
packageName - the package name.
Returns:
a template of such kind.

write

public void write(MakefileAmTemplate template,
                  java.io.File outputDir,
                  org.apache.tools.ant.Task task)
           throws AntMakeException
Writes a Java folder's Makefile.am file to disk.

Parameters:
template - the template to write.
outputDir - the output folder.
task - the task (for logging purposes).
Throws:
AntMakeException - if the file cannot be created.


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