AI2 Component  (Version nb184)
com.google.appinventor.components.scripts.ComponentProcessor.Parameter Class Reference

Protected Member Functions

 Parameter (String name, String type)
 
 Parameter (String name, String type, boolean color)
 
String parameterToYailType (Parameter parameter)
 

Protected Attributes

final String name
 
final String type
 
final boolean color
 

Detailed Description

Represents a parameter consisting of a name and a type. The type is a String representation of the java type, such as "int", "double", or "java.lang.String".

Definition at line 223 of file ComponentProcessor.java.

Constructor & Destructor Documentation

◆ Parameter() [1/2]

com.google.appinventor.components.scripts.ComponentProcessor.Parameter.Parameter ( String  name,
String  type 
)
protected

Constructs a Parameter.

Parameters
namethe parameter name
typethe parameter's Java type (such as "int" or "java.lang.String")

Definition at line 242 of file ComponentProcessor.java.

◆ Parameter() [2/2]

com.google.appinventor.components.scripts.ComponentProcessor.Parameter.Parameter ( String  name,
String  type,
boolean  color 
)
protected

Definition at line 246 of file ComponentProcessor.java.

Member Function Documentation

◆ parameterToYailType()

String com.google.appinventor.components.scripts.ComponentProcessor.Parameter.parameterToYailType ( Parameter  parameter)
protected

Provides a Yail type for a given parameter type. This is useful because the parameter types used for Event are Simple types (e.g., "Single"), while the parameter types used for Method are Java types (e.g., "int".

Parameters
parametera parameter
Returns
the string representation of the corresponding Yail type
Exceptions
RuntimeExceptionif
parameter
does not have a corresponding Yail type

Definition at line 263 of file ComponentProcessor.java.

Member Data Documentation

◆ color

final boolean com.google.appinventor.components.scripts.ComponentProcessor.Parameter.color
protected

Definition at line 234 of file ComponentProcessor.java.

◆ name

final String com.google.appinventor.components.scripts.ComponentProcessor.Parameter.name
protected

The parameter name

Definition at line 227 of file ComponentProcessor.java.

◆ type

final String com.google.appinventor.components.scripts.ComponentProcessor.Parameter.type
protected

The parameter's Java type, such as "int" or "java.lang.String".

Definition at line 232 of file ComponentProcessor.java.


The documentation for this class was generated from the following file: