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

## net.sf.hibernate.tool.hbm2java
Class AbstractRenderer

    java.lang.Object
      |
      +--net.sf.hibernate.tool.hbm2java.AbstractRenderer

All Implemented Interfaces:
  Renderer

Direct Known Subclasses:
  BasicRenderer, FinderRenderer, SLSBperEntityRenderer

public abstract class AbstractRenderer
extends Object
implements Renderer

Author:
  max

Constructor Summary
`AbstractRenderer()`

Method Summary
`protected void` | `genPackageDelaration(String savedToPackage, ClassMapping classMapping, PrintWriter w)`
`String` | `getFieldScope(Field field, String localScopeName, String defaultScope)`
`protected String` | `getPackageDeclaration(String savedToPackage, ClassMapping classMapping)`
`protected static String` | `getTrueTypeName(ClassName cn, Map class2classmap)`
`protected static String` | `getTrueTypeName(Field field, Map class2classmap)` Returns the true name for the given fields class name.
`protected String` | `shortenType(String type, TreeSet imports)` Returns the last part of type if it is in the set of imports.
`protected String` | `toJavaDoc(String string, int indent)` Convert string into something that can be rendered nicely into a javadoc comment.

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

Methods inherited from interface net.sf.hibernate.tool.hbm2java.Renderer
`render`

Constructor Detail

### AbstractRenderer

    public AbstractRenderer()

Method Detail

### getTrueTypeName

    protected static String getTrueTypeName(Field field,
                                            Map class2classmap)

  Returns the true name for the given fields class name. By true name is that it will return the Proxy for the class name if the class was defined with a proxy attribute. If the Field has an then that will overrule any other information.

  Parameters:
    `field` - class name that we use to serach in class2classmap
    `class2classmap` - a map from classname to classmappings
  Returns:
    String return either name or the proxy name of the classmap

### getTrueTypeName

    protected static String getTrueTypeName(ClassName cn,
                                            Map class2classmap)

### shortenType

    protected String shortenType(String type,
                                 TreeSet imports)

  Returns the last part of type if it is in the set of imports. e.g. java.util.Date would become Date, if imports contains java.util.Date.

  Parameters:
    `type` -
    `imports` -
  Returns:
    String

### toJavaDoc

    protected String toJavaDoc(String string,
                               int indent)

  Convert string into something that can be rendered nicely into a javadoc comment. Prefix each line with a star ('*').

  Parameters:
    `string` -

### getFieldScope

    public String getFieldScope(Field field,
                                String localScopeName,
                                String defaultScope)

### getPackageDeclaration

    protected String getPackageDeclaration(String savedToPackage,
                                           ClassMapping classMapping)

### genPackageDelaration

    protected void genPackageDelaration(String savedToPackage,
                                        ClassMapping classMapping,
                                        PrintWriter w)

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