com.moesol.generator
Class JavaClassGeneratorVisitor

java.lang.Object
  extended by com.moesol.generator.ClassGeneratorVisitor
      extended by com.moesol.generator.JavaClassGeneratorVisitor
All Implemented Interfaces:
ReflectVisitor

public class JavaClassGeneratorVisitor
extends ClassGeneratorVisitor


Field Summary
 
Fields inherited from class com.moesol.generator.ClassGeneratorVisitor
current_callable
 
Constructor Summary
JavaClassGeneratorVisitor(Writer out, TranslationContext ctx)
           
 
Method Summary
protected  void addFieldValueProperty(Field field, Properties p)
           
 void arguments(Writer out)
          callback from method.tmpl
 void cni_parameters(Writer out)
          callback from method.tmpl
protected  void extendConstructorProperties(Constructor ctor, Properties p)
          Template method
protected  void extendFieldProperties(Field field, Properties p)
          Template method
protected  void extendMethodProperties(Method method, Properties p)
          Template method
 void final_parameters(Writer out)
          callback from method.tmpl
protected  String getFieldTemplateName(Field field)
          Template method
protected  String getPropertyInit(Callable callable)
           
protected  String getTemplateName(Constructor ctor)
          Template method
protected  String getTemplateName(Method method)
          Template method
 void jni_arguments(Writer out)
          callback from method.tmpl
 void jni_parameters(Writer out)
          callback from method.tmpl
protected  boolean optShouldGenerateCallable(Callable callable)
           
protected  boolean optShouldGenerateField(Field field)
           
protected  boolean origShouldGenerateConstructor(Constructor ctor)
           
protected  boolean origShouldGenerateMethod(Method method)
           
 void parameters(Writer out)
          callback from method.tmpl TODO refactor into base class and just get TypePrinter...!
protected  boolean shouldGenerateConstructor(Constructor ctor)
          Template method
protected  boolean shouldGenerateField(Field field)
          Template method
protected  boolean shouldGenerateMethod(Method method)
          Template method
 void throws_clause(Writer out)
          callback from method.tmpl
 void visit(Class a_class)
          override to change visit strategy
 
Methods inherited from class com.moesol.generator.ClassGeneratorVisitor
createCallable, findConstructorTranslation, findFieldTranslation, findMethodTranslation, findMeTranslation, findParameterTranslation, findPropInitTranslation, getJniName, getJniOverload, getJniReturnError, getJniSelf, getPassAppend, getPropertyName, getSeparator, getTranslationContext, getTransProperty, queryMethodTranslation, queryTranslation, setPassAppend, setPassNumber, visitConstructor, visitField, visitMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaClassGeneratorVisitor

public JavaClassGeneratorVisitor(Writer out,
                                 TranslationContext ctx)
Method Detail

visit

public void visit(Class a_class)
           throws ApplyException
Description copied from class: ClassGeneratorVisitor
override to change visit strategy

Overrides:
visit in class ClassGeneratorVisitor
Throws:
ApplyException

shouldGenerateField

protected boolean shouldGenerateField(Field field)
Description copied from class: ClassGeneratorVisitor
Template method

Overrides:
shouldGenerateField in class ClassGeneratorVisitor

optShouldGenerateField

protected boolean optShouldGenerateField(Field field)

extendFieldProperties

protected void extendFieldProperties(Field field,
                                     Properties p)
                              throws ApplyException
Description copied from class: ClassGeneratorVisitor
Template method

Overrides:
extendFieldProperties in class ClassGeneratorVisitor
Throws:
ApplyException

addFieldValueProperty

protected void addFieldValueProperty(Field field,
                                     Properties p)

getFieldTemplateName

protected String getFieldTemplateName(Field field)
                               throws ApplyException
Description copied from class: ClassGeneratorVisitor
Template method

Specified by:
getFieldTemplateName in class ClassGeneratorVisitor
Throws:
ApplyException

shouldGenerateMethod

protected boolean shouldGenerateMethod(Method method)
                                throws ApplyException
Description copied from class: ClassGeneratorVisitor
Template method

Overrides:
shouldGenerateMethod in class ClassGeneratorVisitor
Throws:
ApplyException

origShouldGenerateMethod

protected boolean origShouldGenerateMethod(Method method)
                                    throws ApplyException
Throws:
ApplyException

optShouldGenerateCallable

protected boolean optShouldGenerateCallable(Callable callable)
                                     throws ApplyException
Throws:
ApplyException

extendMethodProperties

protected void extendMethodProperties(Method method,
                                      Properties p)
                               throws ApplyException
Description copied from class: ClassGeneratorVisitor
Template method

Overrides:
extendMethodProperties in class ClassGeneratorVisitor
Throws:
ApplyException

shouldGenerateConstructor

protected boolean shouldGenerateConstructor(Constructor ctor)
                                     throws ApplyException
Description copied from class: ClassGeneratorVisitor
Template method

Overrides:
shouldGenerateConstructor in class ClassGeneratorVisitor
Throws:
ApplyException

origShouldGenerateConstructor

protected boolean origShouldGenerateConstructor(Constructor ctor)
                                         throws ApplyException
Throws:
ApplyException

extendConstructorProperties

protected void extendConstructorProperties(Constructor ctor,
                                           Properties p)
                                    throws ApplyException
Description copied from class: ClassGeneratorVisitor
Template method

Overrides:
extendConstructorProperties in class ClassGeneratorVisitor
Throws:
ApplyException

getPropertyInit

protected String getPropertyInit(Callable callable)
                          throws ApplyException
Throws:
ApplyException

getTemplateName

protected String getTemplateName(Method method)
                          throws ApplyException
Description copied from class: ClassGeneratorVisitor
Template method

Specified by:
getTemplateName in class ClassGeneratorVisitor
Throws:
ApplyException

getTemplateName

protected String getTemplateName(Constructor ctor)
                          throws ApplyException
Description copied from class: ClassGeneratorVisitor
Template method

Specified by:
getTemplateName in class ClassGeneratorVisitor
Throws:
ApplyException

parameters

public void parameters(Writer out)
                throws IOException,
                       ApplyException
callback from method.tmpl TODO refactor into base class and just get TypePrinter...!

Throws:
IOException
ApplyException

arguments

public void arguments(Writer out)
               throws IOException
callback from method.tmpl

Throws:
IOException

throws_clause

public void throws_clause(Writer out)
                   throws IOException
callback from method.tmpl

Throws:
IOException

jni_parameters

public void jni_parameters(Writer out)
                    throws IOException,
                           ApplyException
callback from method.tmpl

Throws:
IOException
ApplyException

cni_parameters

public void cni_parameters(Writer out)
                    throws IOException,
                           ApplyException
callback from method.tmpl

Throws:
IOException
ApplyException

jni_arguments

public void jni_arguments(Writer out)
                   throws IOException
callback from method.tmpl

Throws:
IOException

final_parameters

public void final_parameters(Writer out)
                      throws ApplyException
callback from method.tmpl

Throws:
ApplyException


Copyright © 2004 Moebius Solutions, Inc. All Rights Reserved.