接口 GeneratorStrategy
-
public interface GeneratorStrategyTheGeneratorStrategyClassGeneratorand producing a byte array containing the data for the generatedClass. By providing your own strategy you may examine or modify the generated class before it is loaded. Typically this will be accomplished by subclassingDefaultGeneratorStrategyand overriding the appropriate protected method.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleanequals(java.lang.Object o)TheGeneratorStrategyin use does not currently, but may in the future, affect the caching of classes generated byAbstractClassGenerator, so this is a reminder that you should correctly implementequalsandhashCodeto avoid generating too many classes.byte[]generate(ClassGenerator cg)Generate the class.
-
-
-
方法详细资料
-
generate
byte[] generate(ClassGenerator cg) throws java.lang.Exception
Generate the class.- 参数:
cg- a class generator on which you can callClassGenerator.generateClass(org.objectweb.asm.ClassVisitor)- 返回:
- a byte array containing the bits of a valid Class
- 抛出:
java.lang.Exception
-
equals
boolean equals(java.lang.Object o)
TheGeneratorStrategyin use does not currently, but may in the future, affect the caching of classes generated byAbstractClassGenerator, so this is a reminder that you should correctly implementequalsandhashCodeto avoid generating too many classes.- 覆盖:
equals在类中java.lang.Object
-
-