net.sf.cglib.beans

Class BeanMap.Generator

public static class BeanMap.Generator extends AbstractClassGenerator

Constructor Summary
Generator()
Method Summary
BeanMapcreate()
Create a new instance of the BeanMap.
voidgenerateClass(ClassVisitor v)
voidsetBean(Object bean)
Set the bean that the generated map should reflect.
voidsetBeanClass(Class beanClass)
Set the class of the bean that the generated map should support.
voidsetRequire(int require)
Limit the properties reflected by the generated map.

Constructor Detail

Generator

public Generator()

Method Detail

create

public BeanMap create()
Create a new instance of the BeanMap. An existing generated class will be reused if possible.

generateClass

public void generateClass(ClassVisitor v)

setBean

public void setBean(Object bean)
Set the bean that the generated map should reflect. The bean may be swapped out for another bean of the same type using Generator. Calling this method overrides any value previously set using Generator. You must call either this method or Generator before Generator.

Parameters: bean the initial bean

setBeanClass

public void setBeanClass(Class beanClass)
Set the class of the bean that the generated map should support. You must call either this method or Generator before Generator.

Parameters: beanClass the class of the bean

setRequire

public void setRequire(int require)
Limit the properties reflected by the generated map.

Parameters: require any combination of Generator and Generator; default is zero (any property allowed)

Copyright (c) 2001 - Apache Software Foundation