Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jif.translate
Class ClassDeclToJavaExt_c

    java.lang.Object
      polyglot.ast.Ext_c
          jif.translate.ToJavaExt_c
              jif.translate.ClassDeclToJavaExt_c

All Implemented Interfaces:
  java.lang.Cloneable, ToJavaExt, polyglot.ast.Ext, polyglot.util.Copy

    public class ClassDeclToJavaExt_c

extends ToJavaExt_c

Field Summary
`protected static java.lang.String` | `DEFAULT_CONSTRUCTOR_INVOKER_METHOD_NAME`
`protected static java.lang.String` | `INITIALIZATIONS_METHOD_NAME`
`protected static java.lang.String` | `INSTANCEOF_METHOD_NAME`

Fields inherited from class polyglot.ast.Ext_c
`ext, node`

Constructor Summary
`ClassDeclToJavaExt_c()`

Method Summary
`protected polyglot.ast.ClassBody` | `addInterfaceParamGetters(polyglot.ast.ClassBody cb, JifPolyType baseClass, JifPolyType jpt, JifToJavaRewriter rw)` Go through the interfaces, and add any required fields and getters for the fields.
`protected java.util.List` | `additionalConstructorCode(JifToJavaRewriter rw)`
`protected polyglot.ast.ClassBody` | `addStaticInitializers(polyglot.ast.ClassBody cb, JifToJavaRewriter rw)` Create methods for static initializations, and add it to cb.
`protected static java.lang.String` | `castMethodName(polyglot.types.ClassType ct)`
`protected static java.lang.String` | `constructorTranslatedName(polyglot.types.ClassType ct)`
`protected static java.lang.String` | `interfaceClassImplName(java.lang.String jifInterfaceName)`
`protected polyglot.ast.ClassMember` | `produceCastMethod(JifPolyType jpt, JifToJavaRewriter rw)`
`protected polyglot.ast.ClassMember` | `produceConstructor(JifPolyType jpt, JifToJavaRewriter rw)`
`protected polyglot.ast.ClassMember` | `produceDefaultConstructorInvoker(polyglot.types.ClassType ct, JifToJavaRewriter rw, java.util.List throwTypes)` Produce a method (with a standard name) that will invoke the default constructor of the class.
`protected polyglot.ast.ClassMember` | `produceInstanceOfMethod(JifPolyType jpt, JifToJavaRewriter rw, boolean useGetters)`
`protected java.util.List` | `produceParamArgs(JifPolyType jpt, JifToJavaRewriter rw)`
`protected static java.util.List` | `produceParamFormals(JifPolyType jpt, JifToJavaRewriter rw, boolean addObjectFormal)`
`polyglot.ast.Node` | `toJava(JifToJavaRewriter rw)`
`polyglot.visit.NodeVisitor` | `toJavaEnter(JifToJavaRewriter rw)`

Methods inherited from class polyglot.ast.Ext_c
`copy, dump, ext, ext, init, node, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface polyglot.ast.Ext
`dump, ext, ext, init, node`

Methods inherited from interface polyglot.util.Copy
`copy`

Field Detail

### INSTANCEOF_METHOD_NAME

    protected static final java.lang.String INSTANCEOF_METHOD_NAME

See Also:
  Constant Field Values

### INITIALIZATIONS_METHOD_NAME

    protected static final java.lang.String INITIALIZATIONS_METHOD_NAME

See Also:
  Constant Field Values

### DEFAULT_CONSTRUCTOR_INVOKER_METHOD_NAME

    protected static final java.lang.String DEFAULT_CONSTRUCTOR_INVOKER_METHOD_NAME

See Also:
  Constant Field Values

Constructor Detail

### ClassDeclToJavaExt_c

    public ClassDeclToJavaExt_c()

Method Detail

### castMethodName

    protected static final java.lang.String castMethodName(polyglot.types.ClassType ct)

### interfaceClassImplName

    protected static final java.lang.String interfaceClassImplName(java.lang.String jifInterfaceName)

### constructorTranslatedName

    protected static final java.lang.String constructorTranslatedName(polyglot.types.ClassType ct)

### toJavaEnter

    public polyglot.visit.NodeVisitor toJavaEnter(JifToJavaRewriter rw)
                                           throws polyglot.types.SemanticException

  Specified by:
    `toJavaEnter` in interface `ToJavaExt`
  Overrides:
    `toJavaEnter` in class `ToJavaExt_c`
  Throws:
    `polyglot.types.SemanticException`

### toJava

    public polyglot.ast.Node toJava(JifToJavaRewriter rw)
                             throws polyglot.types.SemanticException

  Specified by:
    `toJava` in interface `ToJavaExt`
  Specified by:
    `toJava` in class `ToJavaExt_c`
  Throws:
    `polyglot.types.SemanticException`

### addStaticInitializers

    protected polyglot.ast.ClassBody addStaticInitializers(polyglot.ast.ClassBody cb,
                                                           JifToJavaRewriter rw)

  Create methods for static initializations, and add it to cb.

### addInterfaceParamGetters

    protected polyglot.ast.ClassBody addInterfaceParamGetters(polyglot.ast.ClassBody cb,
                                                              JifPolyType baseClass,
                                                              JifPolyType jpt,
                                                              JifToJavaRewriter rw)
                                                       throws polyglot.types.SemanticException

  Go through the interfaces, and add any required fields and getters for the fields.

  Parameters:
    `cb` -
    `jpt` -
    `rw` -
  Throws:
    `polyglot.types.SemanticException`

### produceInstanceOfMethod

    protected polyglot.ast.ClassMember produceInstanceOfMethod(JifPolyType jpt,
                                                               JifToJavaRewriter rw,
                                                               boolean useGetters)
                                                        throws polyglot.types.SemanticException

  Throws:
    `polyglot.types.SemanticException`

### produceCastMethod

    protected polyglot.ast.ClassMember produceCastMethod(JifPolyType jpt,
                                                         JifToJavaRewriter rw)
                                                  throws polyglot.types.SemanticException

  Throws:
    `polyglot.types.SemanticException`

### produceParamFormals

    protected static java.util.List produceParamFormals(JifPolyType jpt,
                                                        JifToJavaRewriter rw,
                                                        boolean addObjectFormal)
                                                 throws polyglot.types.SemanticException

  Throws:
    `polyglot.types.SemanticException`

### produceParamArgs

    protected java.util.List produceParamArgs(JifPolyType jpt,
                                              JifToJavaRewriter rw)

### produceConstructor

    protected polyglot.ast.ClassMember produceConstructor(JifPolyType jpt,
                                                          JifToJavaRewriter rw)
                                                   throws polyglot.types.SemanticException

  Throws:
    `polyglot.types.SemanticException`

### additionalConstructorCode

    protected java.util.List additionalConstructorCode(JifToJavaRewriter rw)

### produceDefaultConstructorInvoker

    protected polyglot.ast.ClassMember produceDefaultConstructorInvoker(polyglot.types.ClassType ct,
                                                                        JifToJavaRewriter rw,
                                                                        java.util.List throwTypes)
                                                                 throws polyglot.types.SemanticException

  Produce a method (with a standard name) that will invoke the default constructor of the class. This method assumes that such a default constructor exists.

  Throws:
    `polyglot.types.SemanticException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD