GeneratorStrategy (cglib (Version 2.2.2))
Keywords: net.sf.cglib.core.GeneratorStrategy interface

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

## net.sf.cglib.core
Interface GeneratorStrategy

All Known Implementing Classes:
  DefaultGeneratorStrategy, UndeclaredThrowableStrategy

    public interface GeneratorStrategy

The `GeneratorStrategy`ClassGenerator` and producing a byte array containing the data for the generated `Class`. By providing your own strategy you may examine or modify the generated class before it is loaded. Typically this will be accomplished by subclassing `DefaultGeneratorStrategy` and overriding the appropriate protected method.`

See Also:
  `AbstractClassGenerator.setStrategy(net.sf.cglib.core.GeneratorStrategy)`

Method Summary
`boolean` | `equals(java.lang.Object o)` The `GeneratorStrategy` in use does not currently, but may in the future, affect the caching of classes generated by `AbstractClassGenerator`, so this is a reminder that you should correctly implement `equals` and `hashCode` to avoid generating too many classes.
`byte[]` | `generate(ClassGenerator cg)` Generate the class.

Method Detail

### generate

    byte[] generate(ClassGenerator cg)
                    throws java.lang.Exception

  Generate the class.

  Parameters:
    `cg` - a class generator on which you can call `ClassGenerator.generateClass(org.objectweb.asm.ClassVisitor)`
  Returns:
    a byte array containing the bits of a valid Class
  Throws:
    `java.lang.Exception`

### equals

    boolean equals(java.lang.Object o)

  The `GeneratorStrategy` in use does not currently, but may in the future, affect the caching of classes generated by `AbstractClassGenerator`, so this is a reminder that you should correctly implement `equals` and `hashCode` to avoid generating too many classes.

  Overrides:
    `equals` in class `java.lang.Object`

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

Copyright (c) 2001 - Apache Software Foundation