public enum JSScopeType extends java.lang.Enum<JSScopeType>
| Enum Constant and Description |
|---|
Block
The block scope type.
|
Catch
The catch scope type.
|
Class
The class scope type.
|
Eval
The eval scope type.
|
Function
The function scope type.
|
Module
The module scope type.
|
ReplMode
The REPL mode scope type.
|
Script
The script scope type.
|
ShadowRealm
The shadow realm scope type.
|
Unknown
The unknown scope type.
|
With
The with scope type.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getId()
Gets the numeric id of this scope type.
|
java.lang.String |
getName()
Gets the name of this scope type.
|
boolean |
isBlock()
Returns whether this scope type is
Block. |
boolean |
isCatch()
Returns whether this scope type is
Catch. |
boolean |
isClass()
Returns whether this scope type is
Class. |
boolean |
isEval()
Returns whether this scope type is
Eval. |
boolean |
isFunction()
Returns whether this scope type is
Function. |
boolean |
isModule()
Returns whether this scope type is
Module. |
boolean |
isScript()
Returns whether this scope type is
Script. |
boolean |
isUnknown()
Returns whether this scope type is
Unknown. |
boolean |
isWith()
Returns whether this scope type is
With. |
static JSScopeType |
parse(int id)
Parses the scope type from its numeric id.
|
static JSScopeType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static JSScopeType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JSScopeType Script
public static final JSScopeType ReplMode
public static final JSScopeType Class
public static final JSScopeType Eval
public static final JSScopeType Function
public static final JSScopeType Module
public static final JSScopeType Catch
public static final JSScopeType Block
public static final JSScopeType With
public static final JSScopeType ShadowRealm
public static final JSScopeType Unknown
public static JSScopeType[] values()
for (JSScopeType c : JSScopeType.values()) System.out.println(c);
public static JSScopeType valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic static JSScopeType parse(int id)
id - the numeric idUnknown if the id is out of rangepublic int getId()
public java.lang.String getName()
public boolean isBlock()
Block.true if this is a block scope, false otherwisepublic boolean isCatch()
Catch.true if this is a catch scope, false otherwisepublic boolean isClass()
Class.true if this is a class scope, false otherwisepublic boolean isEval()
Eval.true if this is an eval scope, false otherwisepublic boolean isFunction()
Function.true if this is a function scope, false otherwisepublic boolean isModule()
Module.true if this is a module scope, false otherwisepublic boolean isScript()
Script.true if this is a script scope, false otherwisepublic boolean isUnknown()
Unknown.true if this is an unknown scope, false otherwisepublic boolean isWith()
With.true if this is a with scope, false otherwise