Class IntentParameterInfo

java.lang.Object
com.codename1.intents.IntentParameterInfo

public final class IntentParameterInfo extends Object
One parameter of a declared intent, as the framework and the simulator see it. Built by the build-time generated registry from the IntentParam annotation; applications read these but never construct them.
  • Constructor Details

    • IntentParameterInfo

      public IntentParameterInfo(String name, String title, IntentParameterType type, boolean required, String entityType, String defaultValue, List<String> options)

      Framework entry point: builds a parameter description. Called by generated code.

      Parameters
      • name: the parameter name used on the wire
      • title: the prompt shown when the platform asks for this value
      • type: the parameter kind
      • required: whether the intent can run without it
      • entityType: the entity type id when type is ENTITY, else null
      • defaultValue: the value used when an optional parameter is absent
      • options: the closed vocabulary, or null when the value is free
  • Method Details

    • getName

      public String getName()
      The parameter name used on the wire and in the parameter map.
    • getTitle

      public String getTitle()
      The prompt the platform shows when it has to ask for this value -- "Which playlist?". Falls back to the name when the declaration gave none.
    • getType

      public IntentParameterType getType()
      The parameter kind.
    • isRequired

      public boolean isRequired()
      Whether the intent can run without this value.
    • getEntityType

      public String getEntityType()
      The entity type id when getType() is IntentParameterType.ENTITY, otherwise null.
    • getDefaultValue

      public String getDefaultValue()
      The value substituted when an optional parameter is absent, or null.
    • getOptions

      public List<String> getOptions()
      The closed vocabulary this parameter accepts, or an empty list when any value is allowed.
    • toString

      public String toString()
      Description copied from class: Object
      Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
      Overrides:
      toString in class Object