All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nervousync.annotations.beans.BeanProperty Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
/*
 * Licensed to the Nervousync Studio (NSYC) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.nervousync.annotations.beans;

import org.nervousync.beans.converter.Adapter;
import org.nervousync.commons.Globals;
import org.nervousync.enumerations.beans.DataFlow;

import java.lang.annotation.*;

/**
 * 

JavaBean Property Annotation

* *

If annotation fields means copy data from target bean

*

If using for Annotation Mappings field, means copy data to target bean

*
*

JavaBean属性注解

* *

如果直接标注在属性上,表示复制数据来自目标对象

*

如果用于Mappings注解的参数,表示将数据复制到目标对象

*
* * @author Steven Wee [email protected] * @version $Revision: 1.0.0 $ $Date: Sep 25, 2022 14:28:33 $ */ @Documented @Repeatable(BeanProperties.class) @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD}) public @interface BeanProperty { /** *

Priority value of JavaBean property

*

Priority value is descending sort for copy property value

*

JavaBean属性的优先级

*

需要复制的属性值依据优先级值进行降序排列

* * @return Priority value * 优先级数值 */ int sortCode() default Globals.INITIALIZE_INT_VALUE; /** *

Enumeration value of JavaBean property data flow

*

JavaBean属性数据流向的枚举值

* * @see org.nervousync.enumerations.beans.DataFlow * @return Enumeration value * 枚举值 */ DataFlow dataFlow(); /** *

Target bean class

*

目标对象类

* * @return Target bean class * 目标对象类 */ Class beanClass(); /** *

Target field name

*

目标属性名

* * @return Target field name * 目标属性名 */ String targetField() default Globals.DEFAULT_VALUE_STRING; /** *

Data converter class

*

Class must implements org.nervousync.beans.converter.IConverter, T is current field type class, U is target bean field type class

*

数据转换类

*

类必须实现接口org.nervousync.beans.converter.IConverter,T是注解属性的数据类型,U是目标属性的数据类型

* * @see Adapter * @return Data converter class * 数据转换类 */ Class converter() default Adapter.class; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy