Cantaloop CGimlet - API Documentation, Version: 0.2.0, Date: 2002-05-13 21:30 CEST

org.cantaloop.cgimlet.lang.java
Class JLanguageFactory

java.lang.Object
  |
  +--org.cantaloop.cgimlet.lang.java.JLanguageFactory
All Implemented Interfaces:
LanguageFactory

public final class JLanguageFactory
extends java.lang.Object
implements LanguageFactory

Implementation of LanguageFactory for the java programming language.

Version:
0.2.0 ($Revision: 1.5 $)
Author:
Stefan Heimann

Inner Class Summary
static class JLanguageFactory.JModifier
           
 
Method Summary
 Type getBoolType()
          Returns the type that represents a boolean in the concrete programming language.
 ClassTemplate getClassTemplate(java.lang.String pkg, java.lang.String name)
          Returns a template for a class in the package pkg with name name.
 CodeWriter getCodeWriter()
           
 CodeCompiler getCompiler()
           
 FieldTemplate getConstantFieldTemplate(Type type, java.lang.String name)
          Returns a template for a field that represents a constant.
 Type getDoubleType()
          Returns the type that represents a floating-point number in the concrete programming language.
 FieldTemplate getFieldTemplate(Type type, java.lang.String name)
           
static LanguageFactory getInstance()
           
 Type getIntType()
          Returns the type that represents a integer in the concrete programming language.
 Type getListType()
          Returns the type that represent a list in the concrete programming language.
 Type getMapType()
          Returns the type that represents a map (sometimes also called dictionary or associative array) in the concrete programming language.
 MethodTemplate getMethodTemplate(java.lang.String name)
           
 Modifier getModifier()
           
 Modifier getModifier(Modifier.Access access, boolean isStatic, boolean isFinal)
           
 Type getSetType()
          Returns the type that represent a set in the concrete programming language.
 Type getStringType()
          Returns the type that represents a string in the concrete programming language.
 Type getType(java.lang.String name)
          Returns a type for the given name.
 CGUtils getUtils()
           
 Type getVoidType()
          Returns the type that represent no type in the concrete programming language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LanguageFactory getInstance()

getCodeWriter

public final CodeWriter getCodeWriter()
Specified by:
getCodeWriter in interface LanguageFactory

getUtils

public final CGUtils getUtils()
Specified by:
getUtils in interface LanguageFactory

getModifier

public Modifier getModifier()
Specified by:
getModifier in interface LanguageFactory

getModifier

public Modifier getModifier(Modifier.Access access,
                            boolean isStatic,
                            boolean isFinal)
Specified by:
getModifier in interface LanguageFactory

getClassTemplate

public final ClassTemplate getClassTemplate(java.lang.String pkg,
                                            java.lang.String name)
Description copied from interface: LanguageFactory
Returns a template for a class in the package pkg with name name.
Specified by:
getClassTemplate in interface LanguageFactory

getMethodTemplate

public final MethodTemplate getMethodTemplate(java.lang.String name)
Specified by:
getMethodTemplate in interface LanguageFactory

getFieldTemplate

public final FieldTemplate getFieldTemplate(Type type,
                                            java.lang.String name)
Specified by:
getFieldTemplate in interface LanguageFactory

getConstantFieldTemplate

public FieldTemplate getConstantFieldTemplate(Type type,
                                              java.lang.String name)
Description copied from interface: LanguageFactory
Returns a template for a field that represents a constant.
Specified by:
getConstantFieldTemplate in interface LanguageFactory
Following copied from interface: org.cantaloop.cgimlet.lang.LanguageFactory
Parameters:
type - the type of the field
name - the name of the field
Returns:
a FieldTemplate value

getStringType

public final Type getStringType()
Description copied from interface: LanguageFactory
Returns the type that represents a string in the concrete programming language.
Specified by:
getStringType in interface LanguageFactory

getIntType

public final Type getIntType()
Description copied from interface: LanguageFactory
Returns the type that represents a integer in the concrete programming language.
Specified by:
getIntType in interface LanguageFactory

getDoubleType

public final Type getDoubleType()
Description copied from interface: LanguageFactory
Returns the type that represents a floating-point number in the concrete programming language.
Specified by:
getDoubleType in interface LanguageFactory

getBoolType

public final Type getBoolType()
Description copied from interface: LanguageFactory
Returns the type that represents a boolean in the concrete programming language.
Specified by:
getBoolType in interface LanguageFactory

getMapType

public final Type getMapType()
Description copied from interface: LanguageFactory
Returns the type that represents a map (sometimes also called dictionary or associative array) in the concrete programming language.
Specified by:
getMapType in interface LanguageFactory

getSetType

public final Type getSetType()
Description copied from interface: LanguageFactory
Returns the type that represent a set in the concrete programming language.
Specified by:
getSetType in interface LanguageFactory

getListType

public final Type getListType()
Description copied from interface: LanguageFactory
Returns the type that represent a list in the concrete programming language.
Specified by:
getListType in interface LanguageFactory

getVoidType

public final Type getVoidType()
Description copied from interface: LanguageFactory
Returns the type that represent no type in the concrete programming language.
Specified by:
getVoidType in interface LanguageFactory

getType

public final Type getType(java.lang.String name)
Description copied from interface: LanguageFactory
Returns a type for the given name.
Specified by:
getType in interface LanguageFactory

getCompiler

public final CodeCompiler getCompiler()
Specified by:
getCompiler in interface LanguageFactory

Copyright 2001, 2002 Stefan Heimann, David Leuschner. All rights reserved.