public enum JSweetProblem extends Enum<JSweetProblem>
| Enum Constant and Description |
|---|
BUNDLE_WITH_MODULE
Raised when trying to create a bundle with a module kind selected.
|
CANDY_VERSION_DISCREPANCY
Raised when using a candy which was generated for an older / newer
version of the transpiler
|
CANNOT_ACCESS_STATIC_MEMBER_ON_THIS
Raised when invoking a static method on this (this is allowed in Java,
but not in JSweet).
|
CANNOT_ACCESS_THIS
Raised when trying to access this from scope it isn't defined.
|
CANNOT_FIND_GLOBAL_DECORATOR_FUNCTION
Raised when a decorator annotation does not declare any associated
function.
|
CLASS_OUT_OF_ROOT_PACKAGE_SCOPE
Raised when a class is declared in a parent of a @Root package.
|
CONSTRUCTOR_MEMBER
Raised when a member is named 'constructor'.
|
CYCLE_IN_STATIC_INITIALIZER_DEPENDENCIES
Raised when a cycle is detected in static initializers.
|
ENCLOSED_ROOT_PACKAGES
Raised when a @Root package is enclosed in a @Root package.
|
ERASED_METHOD
Raised when the program tries to access an erased method (Erased
annotation).
|
FIELD_CONFLICTS_METHOD
Raised when a field has the same name as a method, including methods
defined in superclasses.
|
GLOBAL_CANNOT_BE_INSTANTIATED
Raised if global class is instantiated
|
GLOBAL_CONSTRUCTOR_DEF
Raised when a constructor is defined in a global class
|
GLOBAL_DELETE
Raised when a delete is used in a global context (no enclosing class)
|
GLOBAL_INDEXER_GET
Raised when a get is used in a global context (no enclosing class)
|
GLOBAL_INDEXER_SET
Raised when a set is used in a global context (no enclosing class)
|
GLOBALS_CAN_ONLY_HAVE_STATIC_MEMBERS
Raised when a Globals class declares a non static member.
|
GLOBALS_CLASS_CANNOT_BE_SUBCLASSED
Raised when a class tries to extend a Globals class.
|
GLOBALS_CLASS_CANNOT_HAVE_SUPERCLASS
Raised when a Globals class declares a superclass.
|
HIDDEN_INVOCATION
Raised when a method invocation is hidden by a local variable or
parameter.
|
INDEXED_SET_TYPE_MISMATCH
Raised when an indexed set goes against indexed get type.
|
INNER_CLASS
Raised when an inner class is found.
|
INTERNAL_JAVA_ERROR
Raised when the Java compiler reports an error.
|
INTERNAL_TRANSPILER_ERROR
Raised when the transpiler meets an error while scanning the program's
AST.
|
INTERNAL_TSC_ERROR
Raised when the Tsc transpiler reports an error.
|
INVALID_CONSTRUCTOR_IN_ENUM
Raised when an enum defines a constructor.
|
INVALID_FIELD_IN_ENUM
Raised when an enum defines a field.
|
INVALID_FIELD_INITIALIZER_IN_INTERFACE
Raised when a field initializer is defined in an interface.
|
INVALID_INITIALIZER_IN_INTERFACE
Raised when an initializer is defined in an interface.
|
INVALID_INITIALIZER_STATEMENT
Raised when a class initializer is something else than a field
assignment.
|
INVALID_METHOD_BODY_IN_AMBIENT
Raised when an ambient method defines an implementation.
|
INVALID_METHOD_BODY_IN_INTERFACE
Raised when a method body is defined in an interface.
|
INVALID_METHOD_IN_ENUM
Raised when an enum defines a method.
|
INVALID_MODIFIER_IN_AMBIENT
Raised when an ambient member uses an invalid modifier.
|
INVALID_NON_EMPTY_CONSTRUCTOR_IN_AMBIENT
Raised when an ambient constructor defines an implementation that is not
empty.
|
INVALID_OVERLOAD
Raised when an overload is not valid.
|
INVALID_OVERLOAD_PARAMETER
Raised when an overload parameter is not valid.
|
INVALID_PRIVATE_IN_INTERFACE
Raised when a private visibility is used in an interface.
|
JAVA_COMPILER_NOT_FOUND
Raised when the JDK is not found (hence tools.jar).
|
JDK_METHOD
Raised when the program tries to access a forbidden Java method.
|
JDK_TYPE
Raised when the program tries to access a forbidden Java type.
|
JS_KEYWORD_CONFLICT
Raised when a local variable uses a forbidden JS keyword (var, function,
typeof, ...).
|
MAPPED_TSC_ERROR
Raised when the Tsc transpiler reports an error that can be mapped to the
original source file.
|
METHOD_CONFLICTS_FIELD
Raised when a method has the same name as a field, including fields
defined in superclasses.
|
MISUSED_INSERT_MACRO
Raised when an insert macro is not used properly.
|
MISUSED_TEMPLATE_MACRO
Raised when a template literal is not used properly.
|
MULTIPLE_ROOT_PACKAGES_NOT_ALLOWED_WITH_MODULES
Raised when several @Root packages are used with the module option (the
default package being considered as a @Root package).
|
NATIVE_MODIFIER_IS_NOT_ALLOWED
Raised when a native modifier is used at the wrong place (only allowed in
definitions).
|
NODE_CANNOT_START
Raised when Node is not found.
|
NODE_OBSOLETE_VERSION
Raised when Node version is obsolete and should be updated
|
PACKAGE_NAME_CONTAINS_KEYWORD
Raised when a package is named after an invalid name (typically a
TypeScript keyword).
|
SELF_MIXIN_TARGET
Raised when a mixin targets itself.
|
STRING_LITERAL_EXPECTED
Raised when a string literal is expected.
|
SYNCHRONIZATION
Raised when the program tries to use the synchronized keyword.
|
TRY_WITH_MULTIPLE_CATCHES
Raised when a try statement declares multiple catch clauses.
|
TRY_WITHOUT_CATCH_OR_FINALLY
Raised when a try statement does not declare a catch or a finally clause.
|
TSC_CANNOT_START
Raised when the Tsc transpiler (or the expected version) is not found if
required.
|
UNINITIALIZED_FIELD
Raised when a non-optional field has not been initialized.
|
UNION_TYPE_MISMATCH
Raised when an union type assignment is not compatible with one of the
union-ed types.
|
UNSUPPORTED_TRY_WITH_RESOURCE
Raised when a try-with-resource statement is used in the program.
|
UNTYPED_OBJECT_ODD_PARAMETER_COUNT
Raised when a
$object method is invoked with an odd number
of parameters. |
UNTYPED_OBJECT_WRONG_KEY
Raised when a
$object method is invoked with a key that is
not a string literal. |
USELESS_OPTIONAL_ANNOTATION
Raised when an @Optional annotation is set to a field that is not member
of an interface.
|
USER_ERROR
A user error.
|
USER_MESSAGE
A user message.
|
USER_WARNING
A user warning.
|
WILDCARD_IMPORT
Raised when a wildcard import is used.
|
WRONG_MIXIN_NAME
Raised when a mixin does not have the same name as its target.
|
WRONG_USE_OF_AMBIENT
Raised when an @Ambient is used on a method or a field.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getMessage(Object... params)
Gets the associated message.
|
Severity |
getSeverity()
Gets the severity of this problem.
|
static JSweetProblem |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static JSweetProblem[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final JSweetProblem USER_ERROR
public static final JSweetProblem USER_WARNING
public static final JSweetProblem USER_MESSAGE
public static final JSweetProblem JAVA_COMPILER_NOT_FOUND
public static final JSweetProblem INTERNAL_JAVA_ERROR
public static final JSweetProblem INTERNAL_TRANSPILER_ERROR
public static final JSweetProblem INTERNAL_TSC_ERROR
public static final JSweetProblem MAPPED_TSC_ERROR
public static final JSweetProblem TSC_CANNOT_START
public static final JSweetProblem NODE_CANNOT_START
public static final JSweetProblem NODE_OBSOLETE_VERSION
public static final JSweetProblem JDK_TYPE
By default, all Java types are forbidden except for some classes in the java.lang: Object, String, Boolean, Number, Integer, Double, Void.
public static final JSweetProblem JDK_METHOD
public static final JSweetProblem ERASED_METHOD
public static final JSweetProblem SYNCHRONIZATION
public static final JSweetProblem METHOD_CONFLICTS_FIELD
public static final JSweetProblem FIELD_CONFLICTS_METHOD
public static final JSweetProblem HIDDEN_INVOCATION
public static final JSweetProblem INNER_CLASS
public static final JSweetProblem INVALID_INITIALIZER_STATEMENT
public static final JSweetProblem UNINITIALIZED_FIELD
public static final JSweetProblem USELESS_OPTIONAL_ANNOTATION
public static final JSweetProblem JS_KEYWORD_CONFLICT
public static final JSweetProblem INVALID_PRIVATE_IN_INTERFACE
public static final JSweetProblem INVALID_METHOD_BODY_IN_INTERFACE
public static final JSweetProblem INVALID_FIELD_INITIALIZER_IN_INTERFACE
public static final JSweetProblem INVALID_INITIALIZER_IN_INTERFACE
public static final JSweetProblem INVALID_OVERLOAD
public static final JSweetProblem INVALID_OVERLOAD_PARAMETER
public static final JSweetProblem CONSTRUCTOR_MEMBER
public static final JSweetProblem NATIVE_MODIFIER_IS_NOT_ALLOWED
public static final JSweetProblem TRY_WITHOUT_CATCH_OR_FINALLY
public static final JSweetProblem TRY_WITH_MULTIPLE_CATCHES
public static final JSweetProblem UNSUPPORTED_TRY_WITH_RESOURCE
public static final JSweetProblem GLOBAL_INDEXER_SET
public static final JSweetProblem GLOBAL_INDEXER_GET
public static final JSweetProblem GLOBAL_DELETE
public static final JSweetProblem GLOBAL_CONSTRUCTOR_DEF
public static final JSweetProblem GLOBAL_CANNOT_BE_INSTANTIATED
public static final JSweetProblem STRING_LITERAL_EXPECTED
public static final JSweetProblem INVALID_FIELD_IN_ENUM
public static final JSweetProblem INVALID_CONSTRUCTOR_IN_ENUM
public static final JSweetProblem INVALID_METHOD_IN_ENUM
public static final JSweetProblem INVALID_METHOD_BODY_IN_AMBIENT
public static final JSweetProblem INVALID_NON_EMPTY_CONSTRUCTOR_IN_AMBIENT
public static final JSweetProblem INVALID_MODIFIER_IN_AMBIENT
public static final JSweetProblem WRONG_USE_OF_AMBIENT
public static final JSweetProblem INDEXED_SET_TYPE_MISMATCH
public static final JSweetProblem UNION_TYPE_MISMATCH
public static final JSweetProblem BUNDLE_WITH_MODULE
public static final JSweetProblem PACKAGE_NAME_CONTAINS_KEYWORD
public static final JSweetProblem WILDCARD_IMPORT
public static final JSweetProblem ENCLOSED_ROOT_PACKAGES
public static final JSweetProblem CLASS_OUT_OF_ROOT_PACKAGE_SCOPE
public static final JSweetProblem MULTIPLE_ROOT_PACKAGES_NOT_ALLOWED_WITH_MODULES
public static final JSweetProblem CANDY_VERSION_DISCREPANCY
public static final JSweetProblem GLOBALS_CAN_ONLY_HAVE_STATIC_MEMBERS
public static final JSweetProblem GLOBALS_CLASS_CANNOT_HAVE_SUPERCLASS
public static final JSweetProblem GLOBALS_CLASS_CANNOT_BE_SUBCLASSED
public static final JSweetProblem CANNOT_ACCESS_THIS
public static final JSweetProblem CANNOT_ACCESS_STATIC_MEMBER_ON_THIS
public static final JSweetProblem UNTYPED_OBJECT_ODD_PARAMETER_COUNT
$object method is invoked with an odd number
of parameters.public static final JSweetProblem UNTYPED_OBJECT_WRONG_KEY
$object method is invoked with a key that is
not a string literal.public static final JSweetProblem CYCLE_IN_STATIC_INITIALIZER_DEPENDENCIES
public static final JSweetProblem MISUSED_INSERT_MACRO
public static final JSweetProblem MISUSED_TEMPLATE_MACRO
public static final JSweetProblem WRONG_MIXIN_NAME
public static final JSweetProblem SELF_MIXIN_TARGET
public static final JSweetProblem CANNOT_FIND_GLOBAL_DECORATOR_FUNCTION
public static JSweetProblem[] values()
for (JSweetProblem c : JSweetProblem.values()) System.out.println(c);
public static JSweetProblem 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 Severity getSeverity()