aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/protocol/annotation/UserCommand.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-06-29 15:15:15 +0300
committerGravatar Vitaly Takmazov2016-06-29 15:15:30 +0300
commita6b07685219dee3b48a816e562fdbe93f2419779 (patch)
tree568e5439f37b1429d06a4191904542871e84e5e9 /src/main/java/com/juick/server/protocol/annotation/UserCommand.java
parent1f96985975abe442d899d38e93a411f963b19921 (diff)
add juick bot protocol WIP
Diffstat (limited to 'src/main/java/com/juick/server/protocol/annotation/UserCommand.java')
-rw-r--r--src/main/java/com/juick/server/protocol/annotation/UserCommand.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/protocol/annotation/UserCommand.java b/src/main/java/com/juick/server/protocol/annotation/UserCommand.java
new file mode 100644
index 00000000..af7c4924
--- /dev/null
+++ b/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 "";
+}