public static class BeanMap.Generator extends AbstractClassGenerator
Constructor and Description |
---|
BeanMap.Generator() |
Modifier and Type | Method and Description |
---|---|
BeanMap |
create()
Create a new instance of the
BeanMap . |
void |
generateClass(ClassVisitor v) |
void |
setBean(java.lang.Object bean)
Set the bean that the generated map should reflect.
|
void |
setBeanClass(java.lang.Class beanClass)
Set the class of the bean that the generated map should support.
|
void |
setRequire(int require)
Limit the properties reflected by the generated map.
|
getAttemptLoad, getClassLoader, getCurrent, getNamingPolicy, getStrategy, getUseCache, setAttemptLoad, setClassLoader, setNamingPolicy, setStrategy, setUseCache
public void setBean(java.lang.Object bean)
setBean(java.lang.Object)
.
Calling this method overrides any value previously set using setBeanClass(java.lang.Class)
.
You must call either this method or setBeanClass(java.lang.Class)
before create()
.bean
- the initial beanpublic void setBeanClass(java.lang.Class beanClass)
setBeanClass(java.lang.Class)
before create()
.beanClass
- the class of the beanpublic void setRequire(int require)
require
- any combination of BeanMap.REQUIRE_GETTER
and
BeanMap.REQUIRE_SETTER
; default is zero (any property allowed)public BeanMap create()
BeanMap
. An existing
generated class will be reused if possible.public void generateClass(ClassVisitor v) throws java.lang.Exception
java.lang.Exception
Copyright (c) 2001 - Apache Software Foundation