org.jboss.jca.codegenerator.code

## Class AbstractCodeGen

- java.lang.Object
- - org.jboss.jca.codegenerator.BaseGen
  - - org.jboss.jca.codegenerator.code.AbstractCodeGen

- Direct Known Subclasses:
    ActivationCodeGen, AoInterfaceCodeGen, CciConnCodeGen, CciConnFactoryCodeGen, CfCodeGen, CfInterfaceCodeGen, ConnImplCodeGen, ConnInterfaceCodeGen, ConnMetaCodeGen, ConnSpecCodeGen, MbeanImplCodeGen, MbeanInterfaceCodeGen, McCodeGen, McMetaCodeGen, MlCodeGen, PropsCodeGen, RaMetaCodeGen, TestCodeGen, TestEisCodeGen

      public abstract class AbstractCodeGen
      extends BaseGen

  Abstract CodeGenerator.
  Version:
    $Revision:$
  Author:
    Jeff Zhang

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractCodeGen()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `generate(Definition def, java.io.Writer out)` generate code
    `abstract java.lang.String` | `getClassName(Definition def)` get this class name
    `int` | `getNumOfMcf()` Get the numOfMcf.
    `protected java.lang.String` | `getSelfClassName(Definition def)` get self classname
    `protected void` | `importLogging(Definition def, java.io.Writer out)` import logging
    `void` | `setNumOfMcf(int numOfMcf)` Set the numOfMcf.
    `abstract void` | `writeClassBody(Definition def, java.io.Writer out)` Output class
    `abstract void` | `writeImport(Definition def, java.io.Writer out)` Output class import
    `protected void` | `writeLogging(Definition def, java.io.Writer out, int indent, java.lang.String level, java.lang.String content, java.lang.String... params)` output logging

    - ### Methods inherited from class org.jboss.jca.codegenerator.BaseGen

      `writeEol, writeheader, writeIndent`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractCodeGen

          public AbstractCodeGen()

  - ### Method Detail

    - #### generate

          public void generate(Definition def,
                               java.io.Writer out)
                        throws java.io.IOException

      generate code
      Parameters:
        `def` - Definition
        `out` - Writer
      Throws:
        `java.io.IOException` - ioException

    - #### getClassName

          public abstract java.lang.String getClassName(Definition def)

      get this class name
      Parameters:
        `def` - definition
      Returns:
        String class name

    - #### writeImport

          public abstract void writeImport(Definition def,
                                           java.io.Writer out)
                                    throws java.io.IOException

      Output class import
      Parameters:
        `def` - definition
        `out` - Writer
      Throws:
        `java.io.IOException` - ioException

    - #### writeClassBody

          public abstract void writeClassBody(Definition def,
                                              java.io.Writer out)
                                       throws java.io.IOException

      Output class
      Parameters:
        `def` - definition
        `out` - Writer
      Throws:
        `java.io.IOException` - ioException

    - #### setNumOfMcf

          public void setNumOfMcf(int numOfMcf)

      Set the numOfMcf.
      Parameters:
        `numOfMcf` - The numOfMcf to set.

    - #### getNumOfMcf

          public int getNumOfMcf()

      Get the numOfMcf.
      Returns:
        the numOfMcf.

    - #### getSelfClassName

          protected java.lang.String getSelfClassName(Definition def)

      get self classname
      Parameters:
        `def` - definition
      Returns:
        classname of self

    - #### importLogging

          protected void importLogging(Definition def,
                                       java.io.Writer out)
                                throws java.io.IOException

      import logging
      Parameters:
        `def` - definition
        `out` - Writer
      Throws:
        `java.io.IOException` - ioException

    - #### writeLogging

          protected void writeLogging(Definition def,
                                      java.io.Writer out,
                                      int indent,
                                      java.lang.String level,
                                      java.lang.String content,
                                      java.lang.String... params)
                               throws java.io.IOException

      output logging
      Parameters:
        `def` - definition
        `out` - Writer
        `indent` - indent
        `level` - logging level
        `content` - logging content
        `params` - logging params
      Throws:
        `java.io.IOException` - ioException

Copyright © 2014 IronJacamar (http://www.ironjacamar.org)