Annotation Type CommandContainer


@Target(TYPE) @Retention(RUNTIME) public @interface CommandContainer
Indicates that the class contains command metods.

If using cloud-annotations as an annotation processor, then the class will be listed in a special file under META-INF. These containers can be collectively parsed using AnnotationParser.parseContainers(), which will create instances of the containers and then call AnnotationParser.parse(Object[]) with the created instance.

Every class annotated with CommandContainer needs to be public, and it also needs to have one of the following:

  • A public no-arg constructor
  • A public constructor with AnnotationParser as the sole parameter

NOTE: For container parsing to work, you need to make sure that cloud-annotations is added as an annotation processor.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Returns the priority of the container.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Field Details

  • Element Details

    • priority

      int priority
      Returns the priority of the container.

      A container with a higher priority will get parsed earlier than a container with a lower priority.

      Returns:
      the priority
      Default:
      1