-
@Target(TYPE) @Retention(SOURCE) @Repeatable(ViewOfs.class) public @interface ViewOf
Used to generate the DTO type.
-
-
可选元素概要
可选元素 修饰符和类型 可选元素 说明 AccessaccessThe access type of the generated class.Class<?>configThe configTypeCacheTypeconfigureBeanCacheTypeThe cache type of the configure bean instance achieved fromBeanProvider.AccesscopyConstructorThe access type of the copy constructor.AccesscreateAndWriteBackMethodGenerate a create-and-write-back method.AccessemptyConstructorThe access type of the empty constructor.booleanerrorMethodsUsed to control whether to add the error methods.StringexcludePatternThe regex pattern of the excluded properties.String[]excludesThe excluded properties.StringextendsTypeThe super class of the generated class.AccessfieldsConstructorThe access type of the field constructor.StringgenNameThe simple name of the generated class.StringgenPackageThe package name of the generated class.AccessgettersThe access type of the getter methods.String[]implementsTypesThe interfaces implemented by the generated class.StringincludePatternThe regex pattern of the included properties.String[]includesThe included properties.StringmetaNameThe simple name of the generated meta class.StringmetaPackageThe package name of the generated Meta class.AccessreadConstructorThe access type of the read constructor.booleanserializableWhether the generated class should implementSerializable.longserialVersionUIDSpecialize the serialVersionUID value of theSerializable.AccesssettersThe access type of the setter methods.booleanuseDefaultBeanProviderWhen initialize the configure bean instance, whether to use the default bean provider.Class<?>valueThe targetTypeAccesswriteBackMethodGenerate a write-back method.
-
-
-
元素详细资料
-
value
Class<?> value
The targetType- 返回:
- the target type. By default the annotated class is used.
- 默认值:
- io.github.vipcxj.beanknife.runtime.utils.Self.class
-
-
-
config
Class<?> config
The configType- 返回:
- the config type. By default the annotated class is used.
- 默认值:
- io.github.vipcxj.beanknife.runtime.utils.Self.class
-
-
-
genPackage
String genPackage
The package name of the generated class. By default the package name of the target class is used.- 返回:
- the package name of the generated class
- 另请参阅:
ViewGenPackage
- 默认值:
- ""
-
-
-
genName
String genName
The simple name of the generated class. By default the simple name of the target class + View is used.- 返回:
- the simple name of the generated class
- 另请参阅:
ViewGenNameMapper
- 默认值:
- ""
-
-
-
metaPackage
String metaPackage
The package name of the generated Meta class. By default it is same as package of the generated class.- 返回:
- the package name of the generated meta class
- 另请参阅:
ViewMetaPackage
- 默认值:
- ""
-
-
-
metaName
String metaName
The simple name of the generated meta class. By default the simple name of the target class + Meta is used.- 返回:
- the simple name of the generated meta class
- 另请参阅:
ViewMetaNameMapper
- 默认值:
- ""
-
-
-
access
Access access
The access type of the generated class.- 返回:
- the access type of the generated class.
- 另请参阅:
ViewAccess
- 默认值:
- io.github.vipcxj.beanknife.runtime.annotations.Access.PUBLIC
-
-
-
includes
String[] includes
The included properties. By default, nothing is included.- 返回:
- the included properties
- 另请参阅:
ViewPropertiesInclude
- 默认值:
- {}
-
-
-
excludes
String[] excludes
The excluded properties. By default, nothing is excluded.- 返回:
- the excluded properties
- 另请参阅:
ViewPropertiesExclude
- 默认值:
- {}
-
-
-
includePattern
String includePattern
The regex pattern of the included properties. By default, nothing is included.- 返回:
- the regex pattern of the included properties
- 另请参阅:
ViewPropertiesIncludePattern
- 默认值:
- ""
-
-
-
excludePattern
String excludePattern
The regex pattern of the excluded properties. By default, nothing is excluded.- 返回:
- the regex pattern of the excluded properties
- 另请参阅:
ViewPropertiesExcludePattern
- 默认值:
- ""
-
-
-
emptyConstructor
Access emptyConstructor
The access type of the empty constructor. By default, public is used.- 返回:
- the access type of the empty constructor
- 另请参阅:
ViewEmptyConstructor
- 默认值:
- io.github.vipcxj.beanknife.runtime.annotations.Access.PUBLIC
-
-
-
fieldsConstructor
Access fieldsConstructor
The access type of the field constructor. By default, public is used.- 返回:
- the access type of the field constructor
- 另请参阅:
ViewFieldsConstructor
- 默认值:
- io.github.vipcxj.beanknife.runtime.annotations.Access.PUBLIC
-
-
-
copyConstructor
Access copyConstructor
The access type of the copy constructor. By default, public is used.- 返回:
- the access type of the copy constructor
- 另请参阅:
ViewCopyConstructor
- 默认值:
- io.github.vipcxj.beanknife.runtime.annotations.Access.PUBLIC
-
-
-
readConstructor
Access readConstructor
The access type of the read constructor. By default, public is used. This constructor accept the original class instance as the only argument.- 返回:
- the access type of the read constructor
- 另请参阅:
ViewReadConstructor
- 默认值:
- io.github.vipcxj.beanknife.runtime.annotations.Access.PUBLIC
-
-
-
getters
Access getters
The access type of the getter methods. By default, public is used. It can be override by theViewProperty,OverrideViewPropertyandNewViewProperty.- 返回:
- the access type of the getter methods
- 另请参阅:
ViewGetters
- 默认值:
- io.github.vipcxj.beanknife.runtime.annotations.Access.PUBLIC
-
-
-
setters
Access setters
The access type of the setter methods. By default, none is used, which means there are no setter method. It can be override by theViewProperty,OverrideViewPropertyandNewViewProperty.- 返回:
- the access type of the setter methods
- 另请参阅:
ViewSetters
- 默认值:
- io.github.vipcxj.beanknife.runtime.annotations.Access.NONE
-
-
-
errorMethods
boolean errorMethods
Used to control whether to add the error methods. Default is true.- 返回:
- whether to add the error methods
- 另请参阅:
ViewErrorMethods
- 默认值:
- true
-
-
-
serializable
boolean serializable
Whether the generated class should implementSerializable. By default false.- 返回:
- whether the generated class should implement
Serializable - 另请参阅:
ViewSerializable
- 默认值:
- false
-
-
-
serialVersionUID
long serialVersionUID
- 返回:
- the serialVersionUID value of the
Serializable - 另请参阅:
ViewSerialVersionUID
- 默认值:
- 0L
-
-
-
useDefaultBeanProvider
boolean useDefaultBeanProvider
When initialize the configure bean instance, whether to use the default bean provider. The default bean provider use the empty constructor to initialize the bean.- 返回:
- whether to use default bean provider
- 另请参阅:
BeanProvider,ViewUseDefaultBeanProvider
- 默认值:
- false
-
-
-
configureBeanCacheType
CacheType configureBeanCacheType
The cache type of the configure bean instance achieved fromBeanProvider. By default,CacheType.LOCALis used. it means the configure bean instance is cached as a private field in the generated class.CacheType.NONEmeans no cache, callBeanProvider.get(Class, BeanUsage, Object)every time.CacheType.GLOBALmeans cached only once in the whole application context.- 返回:
- The cache type of the configure bean instance
- 另请参阅:
ViewConfigureBeanCacheType
- 默认值:
- io.github.vipcxj.beanknife.runtime.utils.CacheType.LOCAL
-
-
-
writeBackMethod
Access writeBackMethod
Generate a write-back method. Which writing back to the original type instance. The method does not create a new original type instance. You should create it yourself and send it to the method as a parameter. This means collection and map version write-back methods are not possible.- 返回:
- The access level of the generated write-back method. By default,
Access.NONEis used, it means no method is generated. - 另请参阅:
ViewWriteBackMethod
- 默认值:
- io.github.vipcxj.beanknife.runtime.annotations.Access.NONE
-
-
-
createAndWriteBackMethod
Access createAndWriteBackMethod
Generate a create-and-write-back method. Which creating a new original type instance and then writing back to it. The method create a new original type instance throughBeanProvider. By default, no default bean-provider is provided. SetuseDefaultBeanProvider()to true to activate the default bean provider which just new the instance by reflection. You can also change the default behaviour by put the annotationViewUseDefaultBeanProvideron a base configuration class. Because there is no external parameters is used, The collection and map version create-and-write-back methods are generated as well.- 返回:
- The access level of the generated create-and-write-back method. By default,
Access.NONEis used, it means no method is generated. - 另请参阅:
useDefaultBeanProvider(),ViewUseDefaultBeanProvider,ViewCreateAndWriteBackMethod
- 默认值:
- io.github.vipcxj.beanknife.runtime.annotations.Access.NONE
-
-
-
extendsType
String extendsType
The super class of the generated class. By default, no super class. Note that wrong parent class will cause compilation errors. Note that using the full qualified name.- 返回:
- the super class
- 另请参阅:
ViewExtends
- 默认值:
- ""
-
-
-
implementsTypes
String[] implementsTypes
The interfaces implemented by the generated class. By default, no interfaces is implemented. Note that wrong implemented interfaces will cause compilation errors. Note that using the full qualified name.- 返回:
- the interfaces implemented by the generated class
- 另请参阅:
ViewImplements
- 默认值:
- {}
-
-