org.acmsl.contractchecker
Class ContractCheckerAspectTemplateGenerator

java.lang.Object
  |
  +--org.acmsl.contractchecker.ContractCheckerAspectTemplateGenerator
All Implemented Interfaces:
ContractCheckerAspectTemplateFactory

public class ContractCheckerAspectTemplateGenerator
extends java.lang.Object
implements ContractCheckerAspectTemplateFactory

Is able to generate ContractCheckerAspect templates from Javadoc information.

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

Constructor Summary
protected ContractCheckerAspectTemplateGenerator()
          Protected constructor to avoid accidental instantiation.
 
Method Summary
 ContractCheckerAspectTemplate createContractCheckerAspectTemplate(java.lang.String packageName, java.lang.String defaultException)
          Generates a ContractCheckerAspect template.
 ContractCheckerAspectTemplate createContractCheckerTemplate(java.lang.String packageName, java.lang.String defaultException)
          Generates a ContractChecker template.
static ContractCheckerAspectTemplateGenerator getInstance()
          Retrieves a ContractCheckerTemplateGenerator instance.
protected static java.lang.ref.WeakReference getReference()
          Retrieves the weak reference.
protected static void setReference(ContractCheckerAspectTemplateGenerator generator)
          Specifies a new weak reference.
 void write(ContractCheckerAspectTemplate template, java.io.File outputDir)
          Writes a ContractCheckerAspect template to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContractCheckerAspectTemplateGenerator

protected ContractCheckerAspectTemplateGenerator()
Protected constructor to avoid accidental instantiation.

Method Detail

setReference

protected static void setReference(ContractCheckerAspectTemplateGenerator 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 ContractCheckerAspectTemplateGenerator getInstance()
Retrieves a ContractCheckerTemplateGenerator instance.

Returns:
such instance.

createContractCheckerTemplate

public ContractCheckerAspectTemplate createContractCheckerTemplate(java.lang.String packageName,
                                                                   java.lang.String defaultException)
Generates a ContractChecker template.

Parameters:
packageName - the package name.
defaultException - the default exception.
Returns:
a template.

createContractCheckerAspectTemplate

public ContractCheckerAspectTemplate createContractCheckerAspectTemplate(java.lang.String packageName,
                                                                         java.lang.String defaultException)
Generates a ContractCheckerAspect template.

Specified by:
createContractCheckerAspectTemplate in interface ContractCheckerAspectTemplateFactory
Parameters:
packageName - the package name.
defaultException - the default exception.
Returns:
a template.

write

public void write(ContractCheckerAspectTemplate template,
                  java.io.File outputDir)
           throws java.io.IOException
Writes a ContractCheckerAspect template to disk.

Parameters:
template - the template to write.
outputDir - the output folder.
Throws:
java.io.IOException - if the file cannot be created.


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