From 6ba7eb5fe1384ec87cdd0031d185a9b26512a016 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Sun, 13 Nov 2016 21:21:45 +0700 Subject: server core module --- .../server/protocol/annotation/UserCommand.java | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java (limited to 'server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java') diff --git a/server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java b/server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java new file mode 100644 index 00000000..af7c4924 --- /dev/null +++ b/server-core/src/main/java/com/juick/server/protocol/annotation/UserCommand.java @@ -0,0 +1,31 @@ +package com.juick.server.protocol.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Created by oxpa on 22.03.16. + */ +@Target({ElementType.TYPE, ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +public @interface UserCommand { + /** + * + * @return a command pattern + */ + String pattern() default ""; + + /** + * + * @return pattern flags + */ + int patternFlags() default 0; + + /** + * + * @return a string used in HELP command output. Basically, only 1 string + */ + String help() default ""; +} -- cgit v1.2.3