[Japi-cvs] SF.net SVN: japi: [254] libs/swing-action/trunk/src/net/sf/japi/swing/ ActionMethod.java
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2006-12-06 21:40:46
|
Revision: 254 http://svn.sourceforge.net/japi/?rev=254&view=rev Author: christianhujer Date: 2006-12-06 13:40:33 -0800 (Wed, 06 Dec 2006) Log Message: ----------- Added support for methods that use different keys than their name. Modified Paths: -------------- libs/swing-action/trunk/src/net/sf/japi/swing/ActionMethod.java Modified: libs/swing-action/trunk/src/net/sf/japi/swing/ActionMethod.java =================================================================== --- libs/swing-action/trunk/src/net/sf/japi/swing/ActionMethod.java 2006-12-05 22:42:20 UTC (rev 253) +++ libs/swing-action/trunk/src/net/sf/japi/swing/ActionMethod.java 2006-12-06 21:40:33 UTC (rev 254) @@ -26,6 +26,7 @@ import java.lang.annotation.Target; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; +import org.jetbrains.annotations.NotNull; /** Annotation for methods that are Actions. * {@link ActionFactory} in future will automatically configure and store Actions with properties for methods that are annotated with this Annotation. @@ -38,4 +39,12 @@ @Retention(RUNTIME) @Target(METHOD) public @interface ActionMethod { + + /** + * Determines the Action key. + * Defaults to the method name. + * @return The Action key for this ActionMethod or <code>""</code> if the method name should be used. + */ + @NotNull String value() default ""; + } // @interface ActionMethod This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |