public class BeanGenerator extends AbstractClassGenerator
AbstractClassGenerator.Source
Constructor and Description |
---|
BeanGenerator() |
Modifier and Type | Method and Description |
---|---|
static void |
addProperties(BeanGenerator gen,
Class type) |
static void |
addProperties(BeanGenerator gen,
Map props) |
static void |
addProperties(BeanGenerator gen,
PropertyDescriptor[] descriptors) |
void |
addProperty(String name,
Class type) |
Object |
create() |
Object |
createClass() |
protected Object |
firstInstance(Class type) |
void |
generateClass(ClassVisitor v) |
protected ClassLoader |
getDefaultClassLoader() |
protected Object |
nextInstance(Object instance) |
void |
setSuperclass(Class superclass)
Set the class which the generated class will extend.
|
create, getAttemptLoad, getClassLoader, getClassName, getCurrent, getNamingPolicy, getStrategy, getUseCache, setAttemptLoad, setClassLoader, setNamePrefix, setNamingPolicy, setStrategy, setUseCache
public void setSuperclass(Class superclass)
superclass
- class to extend, or null to extend Objectprotected ClassLoader getDefaultClassLoader()
getDefaultClassLoader
in class AbstractClassGenerator
public Object create()
public Object createClass()
public void generateClass(ClassVisitor v) throws Exception
Exception
protected Object firstInstance(Class type)
firstInstance
in class AbstractClassGenerator
protected Object nextInstance(Object instance)
nextInstance
in class AbstractClassGenerator
public static void addProperties(BeanGenerator gen, Map props)
public static void addProperties(BeanGenerator gen, Class type)
public static void addProperties(BeanGenerator gen, PropertyDescriptor[] descriptors)
Copyright © 2018. All rights reserved.