Class IntentParameterInfo
java.lang.Object
com.codename1.intents.IntentParameterInfo
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 Summary
ConstructorsConstructorDescriptionIntentParameterInfo(String name, String title, IntentParameterType type, boolean required, String entityType, String defaultValue, List<String> options) Framework entry point: builds a parameter description. -
Method Summary
Modifier and TypeMethodDescriptionThe value substituted when an optional parameter is absent, or null.The entity type id whengetType()isIntentParameterType.ENTITY, otherwise null.getName()The parameter name used on the wire and in the parameter map.The closed vocabulary this parameter accepts, or an empty list when any value is allowed.getTitle()The prompt the platform shows when it has to ask for this value -- "Which playlist?".getType()The parameter kind.booleanWhether the intent can run without this value.toString()Returns a string representation of the object.
-
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 wiretitle: the prompt shown when the platform asks for this valuetype: the parameter kindrequired: whether the intent can run without itentityType: the entity type id whentypeisENTITY, else nulldefaultValue: the value used when an optional parameter is absentoptions: the closed vocabulary, or null when the value is free
-
-
Method Details
-
getName
The parameter name used on the wire and in the parameter map. -
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
The parameter kind. -
isRequired
public boolean isRequired()Whether the intent can run without this value. -
getEntityType
The entity type id whengetType()isIntentParameterType.ENTITY, otherwise null. -
getDefaultValue
The value substituted when an optional parameter is absent, or null. -
getOptions
-
toString
Description copied from class:ObjectReturns 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())
-