Package com.googlecode.aviator
Enum Feature
- java.lang.Object
-
- java.lang.Enum<Feature>
-
- com.googlecode.aviator.Feature
-
-
Enum Constant Summary
Enum Constants Enum Constant Description Assignment
variable assignmentExceptionHandle
try..catch..finally and throw statement to handle exceptions.Fn
fn to define named functionForLoop
for loop statementIf
if/elsif/else statementInternalVars
Internal vars such as __env__, __instance__Lambda
lambda to define functionLet
let statementLexicalScope
Lexical scopeModule
module system such as exports/require/load function supporting.NewInstance
new Class(arguments) to create an instance of special class with arguments.Return
return statementStaticFields
Access java class's static fields by Class.FIELDStaticMethods
Invoke java class's static methods by Class.method(..args)StringInterpolation
String interpolation.For example, "a = 'aviator'; 'hello #{a}'" to generate a string 'hello aviator'Use
use package.class to import java classes into current context.WhileLoop
while statement
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<AviatorFunction>
functions
Functions to support the feature.private java.util.Set<Feature>
prequires
Require feature sets for this feature.
-
Constructor Summary
Constructors Modifier Constructor Description private
Feature()
private
Feature(java.util.List<AviatorFunction> funcs)
private
Feature(java.util.Set<Feature> prequires)
private
Feature(java.util.Set<Feature> prequires, java.util.List<AviatorFunction> funcs)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.List<AviatorFunction>
asList(AviatorFunction... args)
static java.util.Set<Feature>
asSet(Feature... args)
Create a feature set from arguments.static java.util.Set<Feature>
getCompatibleFeatures()
Returns the feature set that is compatible with aviator early versions(before 5.0).static java.util.Set<Feature>
getFullFeatures()
Returns the full feature set.java.util.List<AviatorFunction>
getFunctions()
java.util.Set<Feature>
getPrequires()
static Feature
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Feature[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Assignment
public static final Feature Assignment
variable assignment
-
Return
public static final Feature Return
return statement
-
If
public static final Feature If
if/elsif/else statement
-
ForLoop
public static final Feature ForLoop
for loop statement
-
WhileLoop
public static final Feature WhileLoop
while statement
-
Let
public static final Feature Let
let statement
-
LexicalScope
public static final Feature LexicalScope
Lexical scope
-
Lambda
public static final Feature Lambda
lambda to define function
-
Fn
public static final Feature Fn
fn to define named function
-
InternalVars
public static final Feature InternalVars
Internal vars such as __env__, __instance__
-
Module
public static final Feature Module
module system such as exports/require/load function supporting.
-
ExceptionHandle
public static final Feature ExceptionHandle
try..catch..finally and throw statement to handle exceptions.
-
NewInstance
public static final Feature NewInstance
new Class(arguments) to create an instance of special class with arguments.
-
StringInterpolation
public static final Feature StringInterpolation
String interpolation.For example, "a = 'aviator'; 'hello #{a}'" to generate a string 'hello aviator'
-
Use
public static final Feature Use
use package.class to import java classes into current context.- Since:
- 5.2.0
-
StaticFields
public static final Feature StaticFields
Access java class's static fields by Class.FIELD- Since:
- 5.2.2
-
StaticMethods
public static final Feature StaticMethods
Invoke java class's static methods by Class.method(..args)- Since:
- 5.2.2
-
-
Field Detail
-
prequires
private java.util.Set<Feature> prequires
Require feature sets for this feature.
-
functions
private java.util.List<AviatorFunction> functions
Functions to support the feature.
-
-
Constructor Detail
-
Feature
private Feature()
-
Feature
private Feature(java.util.Set<Feature> prequires)
-
Feature
private Feature(java.util.List<AviatorFunction> funcs)
-
Feature
private Feature(java.util.Set<Feature> prequires, java.util.List<AviatorFunction> funcs)
-
-
Method Detail
-
values
public static Feature[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Feature c : Feature.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Feature valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
asList
private static java.util.List<AviatorFunction> asList(AviatorFunction... args)
-
getFunctions
public java.util.List<AviatorFunction> getFunctions()
-
asSet
public static java.util.Set<Feature> asSet(Feature... args)
Create a feature set from arguments.- Parameters:
args
-- Returns:
- feature set
-
getPrequires
public java.util.Set<Feature> getPrequires()
-
getFullFeatures
public static java.util.Set<Feature> getFullFeatures()
Returns the full feature set.- Returns:
-
getCompatibleFeatures
public static java.util.Set<Feature> getCompatibleFeatures()
Returns the feature set that is compatible with aviator early versions(before 5.0).- Returns:
-
-