Save This Page
Home » cglib-src-2.2 » net.sf.cglib.core » [javadoc | source]
public interface: GeneratorStrategy [javadoc | source]

All Known Implementing Classes:
    DefaultGeneratorStrategy, UndeclaredThrowableStrategy

The GeneratorStrategyClassGenerator 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.
Method from net.sf.cglib.core.GeneratorStrategy Summary:
equals,   generate
Method from net.sf.cglib.core.GeneratorStrategy Detail:
 public boolean equals(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.
 public byte[] generate(ClassGenerator cg) throws Exception
    Generate the class.