1 /** 2 * Copyright By Grandsoft Company Limited. 3 * 2012-2-27 下午04:02:57 4 */ 5 package gboat2.base.core.annotation; 6 7 import java.lang.annotation.ElementType; 8 import java.lang.annotation.Retention; 9 import java.lang.annotation.RetentionPolicy; 10 import java.lang.annotation.Target; 11 12 /** 13 * 一个 Action 类可以配置成多个模块,每个模块可以自定义入口方法,可带参数,可带模块默认编码,如: 14 * <pre><code> 15 * @Modules( { 16 * @Module(name = "首选项1", code = "CODE1"), 17 * @Module(name = "首选项2", code = "CODE2", entryMethod = "prefer2"), 18 * @Module(name = "首选项3", code = "CODE3", entryMethod = "prefer3", params = { "a", "1" }), 19 * @Module(name = "首选项4", code = "CODE4", entryMethod = "prefer3", params = { "a", "2" }) 20 * }) 21 * public class PreferenceAction extends BaseActionSupport { 22 * ... 23 * } 24 * </code></pre> 25 * @author lysming 26 * @author tanxw 27 * @since 3.0 28 * @date 2012-2-27 29 * @see Module 30 */ 31 @Retention(RetentionPolicy.RUNTIME) 32 @Target(ElementType.TYPE) 33 public @interface Modules { 34 35 public Module[] value(); 36 }