ecologylab.semantics.tools
Class MetadataCompilerUtils

java.lang.Object
  extended by ecologylab.semantics.tools.MetadataCompilerUtils

public class MetadataCompilerUtils
extends java.lang.Object

This class has all the constants which are needed by the compiler.

Author:
amathur

Field Summary
static java.lang.String COMMENT
           
static java.io.PrintWriter directBindingTranslationScope
           
static java.lang.String END_JAVA_DOC
           
static int GENERATE_FIELDS_PASS
           
static int GENERATE_METHODS_PASS
           
static java.lang.String GENERATED_METADATA_TRANSLATIONS
           
static java.io.PrintWriter generatedTranslationScope
           
static java.lang.String IMPORTS
           
static java.lang.String PACKAGE
           
static java.lang.String PACKAGE_NAME
           
static java.lang.String START_JAVA_DOC
           
 
Constructor Summary
MetadataCompilerUtils()
           
 
Method Summary
static void appendBlankConstructor(java.lang.Appendable appendable, java.lang.String className)
          This method appends blank constructor
static void appendConstructor(java.lang.Appendable appendable, java.lang.String className)
          This appends a constructor with call to super.
static void appendToTranslationScope(java.lang.String append)
          It appends the specified String to the translation scope class.
static void createTranslationScopeClass(java.lang.String generationPath)
          Creates a class for writing translation scope for generated classes.
static void endTranslationScopeClass()
          This metod adds the get() method to generated tralation scope and flushes the class out.
static java.lang.String getGenerationPath(java.lang.String packageName)
          This method returns the path where the generated files are to be placed.
static void main(java.lang.String[] args)
           
static void writeJavaDocComment(java.lang.String comment, java.lang.Appendable f)
          TODO change this to write to file
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PACKAGE_NAME

public static final java.lang.String PACKAGE_NAME
See Also:
Constant Field Values

START_JAVA_DOC

public static final java.lang.String START_JAVA_DOC
See Also:
Constant Field Values

END_JAVA_DOC

public static final java.lang.String END_JAVA_DOC
See Also:
Constant Field Values

COMMENT

public static final java.lang.String COMMENT
See Also:
Constant Field Values

IMPORTS

public static final java.lang.String IMPORTS

PACKAGE

public static final java.lang.String PACKAGE
See Also:
Constant Field Values

GENERATED_METADATA_TRANSLATIONS

public static final java.lang.String GENERATED_METADATA_TRANSLATIONS
See Also:
Constant Field Values

generatedTranslationScope

public static java.io.PrintWriter generatedTranslationScope

directBindingTranslationScope

public static java.io.PrintWriter directBindingTranslationScope

GENERATE_FIELDS_PASS

public static int GENERATE_FIELDS_PASS

GENERATE_METHODS_PASS

public static int GENERATE_METHODS_PASS
Constructor Detail

MetadataCompilerUtils

public MetadataCompilerUtils()
Method Detail

writeJavaDocComment

public static void writeJavaDocComment(java.lang.String comment,
                                       java.lang.Appendable f)
                                throws java.io.IOException
TODO change this to write to file

Parameters:
comment -
Throws:
java.io.IOException

getGenerationPath

public static java.lang.String getGenerationPath(java.lang.String packageName)
This method returns the path where the generated files are to be placed. TODO FIX ME TO USE PREFS.

Parameters:
packageName - The package in which generated files are to be placed.
Returns:
The path.

main

public static void main(java.lang.String[] args)

appendBlankConstructor

public static void appendBlankConstructor(java.lang.Appendable appendable,
                                          java.lang.String className)
                                   throws java.io.IOException
This method appends blank constructor

Throws:
java.io.IOException

appendConstructor

public static void appendConstructor(java.lang.Appendable appendable,
                                     java.lang.String className)
                              throws java.io.IOException
This appends a constructor with call to super.

Throws:
java.io.IOException

appendToTranslationScope

public static void appendToTranslationScope(java.lang.String append)
It appends the specified String to the translation scope class.

Parameters:
append -

endTranslationScopeClass

public static void endTranslationScopeClass()
This metod adds the get() method to generated tralation scope and flushes the class out.


createTranslationScopeClass

public static void createTranslationScopeClass(java.lang.String generationPath)
                                        throws java.io.IOException
Creates a class for writing translation scope for generated classes.

Parameters:
generationPath -
Throws:
java.io.IOException