public static enum CompilerOptions.LanguageMode extends Enum<CompilerOptions.LanguageMode>
Enum Constant and Description |
---|
ECMASCRIPT3
90's JavaScript
|
ECMASCRIPT5
Traditional JavaScript
|
ECMASCRIPT5_STRICT
Nitpicky, traditional JavaScript
|
ECMASCRIPT6
Shiny new JavaScript
|
ECMASCRIPT6_STRICT
Nitpicky, shiny new JavaScript
|
ECMASCRIPT6_TYPED
A superset of ES6 which adds Typescript-style type declarations.
|
ECMASCRIPT7
A superset of ES6 which adds the exponent operator (**).
|
ECMASCRIPT8
A superset of ES7 which adds async functions.
|
NO_TRANSPILE
For languageOut only.
|
Modifier and Type | Method and Description |
---|---|
static CompilerOptions.LanguageMode |
fromString(String value) |
boolean |
isEs5OrHigher()
Whether this is ECMAScript 5 or higher.
|
boolean |
isEs6OrHigher()
Whether this is ECMAScript 6 or higher.
|
boolean |
isStrict()
Whether this is a "strict mode" language.
|
static CompilerOptions.LanguageMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CompilerOptions.LanguageMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CompilerOptions.LanguageMode ECMASCRIPT3
public static final CompilerOptions.LanguageMode ECMASCRIPT5
public static final CompilerOptions.LanguageMode ECMASCRIPT5_STRICT
public static final CompilerOptions.LanguageMode ECMASCRIPT6
public static final CompilerOptions.LanguageMode ECMASCRIPT6_STRICT
public static final CompilerOptions.LanguageMode ECMASCRIPT6_TYPED
public static final CompilerOptions.LanguageMode ECMASCRIPT7
public static final CompilerOptions.LanguageMode ECMASCRIPT8
public static final CompilerOptions.LanguageMode NO_TRANSPILE
public static CompilerOptions.LanguageMode[] values()
for (CompilerOptions.LanguageMode c : CompilerOptions.LanguageMode.values()) System.out.println(c);
public static CompilerOptions.LanguageMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isStrict()
public boolean isEs5OrHigher()
public boolean isEs6OrHigher()
public static CompilerOptions.LanguageMode fromString(String value)
Copyright © 2009-2016 Google. All Rights Reserved.