接口 GeneratorStrategy
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
The
GeneratorStrategy</code. is responsible for taking a
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.-
方法概要
修饰符和类型方法说明booleanTheGeneratorStrategyin 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 the class.
-
方法详细资料
-
generate
Generate the class.- 参数:
cg- a class generator on which you can callClassGenerator.generateClass(cn.taketoday.bytecode.ClassVisitor)- 返回:
- a byte array containing the bits of a valid Class
- 抛出:
Exception
-
equals
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.
-