Enum Class Feature

java.lang.Object
java.lang.Enum<Feature>
com.googlecode.aviator.Feature
All Implemented Interfaces:
Serializable, Comparable<Feature>, Constable

public enum Feature extends Enum<Feature>
Syntax features.
  • Enum Constant Details

    • 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 Details

    • prequires

      private Set<Feature> prequires
      Require feature sets for this feature.
    • functions

      private List<AviatorFunction> functions
      Functions to support the feature.
  • Constructor Details

  • Method Details

    • values

      public static Feature[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Feature valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • asList

      private static List<AviatorFunction> asList(AviatorFunction... args)
    • getFunctions

      public List<AviatorFunction> getFunctions()
    • asSet

      public static Set<Feature> asSet(Feature... args)
      Create a feature set from arguments.
      Parameters:
      args -
      Returns:
      feature set
    • getPrequires

      public Set<Feature> getPrequires()
    • getFullFeatures

      public static Set<Feature> getFullFeatures()
      Returns the full feature set.
      Returns:
    • getCompatibleFeatures

      public static Set<Feature> getCompatibleFeatures()
      Returns the feature set that is compatible with aviator early versions(before 5.0).
      Returns: