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

## org.apache.cayenne.enhancer
Class EnhancementHelper

    java.lang.Object
      org.apache.cayenne.enhancer.EnhancementHelper

    public class EnhancementHelper

extends Object

A helper for the ASM ClassVisitor that encapsulates common class enhancement operations.

Since:
  3.0
Author:
  Andrus Adamchik

Constructor Summary
`EnhancementHelper(ClassVisitor classVisitor)`

Method Summary
`String[]` | `addInterface(String[] interfaces, Class newInterface)`
`void` | `createField(Class fieldType, String name)` Creates a new protected field in the current class.
`void` | `createField(Class fieldType, String name, boolean isTransient)` Creates a new protected field in the current class.
`void` | `createProperty(Class propertyType, String name)`
`void` | `createProperty(Class propertyType, String name, boolean isTransient)`
`Type` | `getCurrentClass()`
`String` | `getPropertyField(String propertyName)`
`static boolean` | `isGeneratedField(String name)` Returns whether the field name matches the naming pattern of fields generated by Cayenne enhancer.
`void` | `reset(String className)`

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

Constructor Detail

### EnhancementHelper

    public EnhancementHelper(ClassVisitor classVisitor)

Method Detail

### isGeneratedField

    public static boolean isGeneratedField(String name)

  Returns whether the field name matches the naming pattern of fields generated by Cayenne enhancer.

### getCurrentClass

    public Type getCurrentClass()

### getPropertyField

    public String getPropertyField(String propertyName)

### reset

    public void reset(String className)

### addInterface

    public String[] addInterface(String[] interfaces,
                                 Class newInterface)

### createField

    public void createField(Class fieldType,
                            String name)

  Creates a new protected field in the current class. Field name will be automatically prefixed by "$cay_".

### createField

    public void createField(Class fieldType,
                            String name,
                            boolean isTransient)

  Creates a new protected field in the current class. Field name will be automatically prefixed by "$cay_".

### createProperty

    public void createProperty(Class propertyType,
                               String name)

### createProperty

    public void createProperty(Class propertyType,
                               String name,
                               boolean isTransient)

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

Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.