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

commons.box.app.annotation.Label Maven / Gradle / Ivy

The newest version!
package commons.box.app.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 表示描述的标签,用于定义 类、字段或方法在显示端的名称
 * 

* 声明消息,消息子串是一个数组,例子:"default", "zh_CN=adfasdfadsf" *

* 如果声明了name,那么该name应用于该字段,如果value为空则仅仅是变更了声明,如果不为空表示该健值的消息同时会应用到消息系统中 *

* 注意:如果要更改name定义必须使用Label标签,如果要定义多个扩展值或者额外定义消息但不应用,可使用Labels组合 */ @Retention(value = RetentionPolicy.RUNTIME) @Target(value = {ElementType.FIELD, ElementType.METHOD, ElementType.TYPE}) public @interface Label { /** * 定义对应的值,每个值组成形式为 label 或者 locale=lable *

* 其中表达式不含=表示默认label,包含=表示对应语区=label值(*=label值 时也表示默认label)。 * * @return */ String[] value() default {}; /** * 为空则使用类名加字段名的形式, *

* 不为空则表示该字段使用name所声明的值,如果name以+开头则表示使用默认值并扩展该值: *

* 例如:name字段默认为com.hreeinfo.dto.Uesr.name, *

* 当name为op.othername的时候,查找消息op.othername *

* 当name为+othername的时候,查找消息com.hreeinfo.dto.Uesr.name.othername * * @return key */ String name() default ""; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy