public class JSORestrictionsChecker extends Object
JavaScriptObject
(JSO)
restrictions. The restrictions are summarized in
jsoRestrictions.html
.
Any violations found are attached as errors on the
CompilationUnitDeclaration.jsoRestrictions.html
Modifier and Type | Class and Description |
---|---|
static class |
JSORestrictionsChecker.CheckerState
The order in which the checker will process types is undefined, so this
type accumulates the information necessary for sanity-checking the JSO
types.
|
Modifier and Type | Field and Description |
---|---|
static String |
ERR_CLASS_EXTENDS_MAGIC_PROTOTYPE_BUT_NO_PROTOTYPE_ATTRIBUTE |
static String |
ERR_CONSTRUCTOR_WITH_PARAMETERS |
static String |
ERR_FORGOT_TO_MAKE_PROTOTYPE_IMPL_JSTYPE |
static String |
ERR_INSTANCE_FIELD |
static String |
ERR_INSTANCE_METHOD_NONFINAL |
static String |
ERR_IS_NONSTATIC_NESTED |
static String |
ERR_JS_TYPE_WITH_PROTOTYPE_SET_NOT_ALLOWED_ON_CLASS_TYPES |
static String |
ERR_JSEXPORT_ONLY_CTORS_AND_STATIC_METHODS |
static String |
ERR_JSPROPERTY_ONLY_BEAN_OR_FLUENT_STYLE_NAMING |
static String |
ERR_JSPROPERTY_ONLY_ON_INTERFACES |
static String |
ERR_JSTYPE_OVERLOADS_NOT_ALLOWED |
static String |
ERR_MUST_EXTEND_MAGIC_PROTOTYPE_CLASS |
static String |
ERR_NEW_JSO |
static String |
ERR_NONEMPTY_CONSTRUCTOR |
static String |
ERR_NONPROTECTED_CONSTRUCTOR |
static String |
ERR_OVERRIDDEN_METHOD |
static String |
ERR_SUBCLASSING_NATIVE_NOT_ALLOWED |
static String |
JSO_CLASS |
Modifier and Type | Method and Description |
---|---|
static void |
check(JSORestrictionsChecker.CheckerState state,
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud)
Checks an entire
CompilationUnitDeclaration . |
static boolean |
isJso(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding)
Returns
true if typeBinding is JavaScriptObject or
any subtype. |
static boolean |
isJsoSubclass(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding)
Returns
true if typeBinding is a subtype of
JavaScriptObject , but not JavaScriptObject itself. |
public static final String ERR_JSTYPE_OVERLOADS_NOT_ALLOWED
public static final String ERR_JSEXPORT_ONLY_CTORS_AND_STATIC_METHODS
public static final String ERR_JSPROPERTY_ONLY_BEAN_OR_FLUENT_STYLE_NAMING
public static final String ERR_MUST_EXTEND_MAGIC_PROTOTYPE_CLASS
public static final String ERR_CLASS_EXTENDS_MAGIC_PROTOTYPE_BUT_NO_PROTOTYPE_ATTRIBUTE
public static final String ERR_JSPROPERTY_ONLY_ON_INTERFACES
public static final String ERR_CONSTRUCTOR_WITH_PARAMETERS
public static final String ERR_INSTANCE_FIELD
public static final String ERR_INSTANCE_METHOD_NONFINAL
public static final String ERR_IS_NONSTATIC_NESTED
public static final String ERR_NEW_JSO
public static final String ERR_NONEMPTY_CONSTRUCTOR
public static final String ERR_NONPROTECTED_CONSTRUCTOR
public static final String ERR_OVERRIDDEN_METHOD
public static final String JSO_CLASS
public static final String ERR_FORGOT_TO_MAKE_PROTOTYPE_IMPL_JSTYPE
public static final String ERR_SUBCLASSING_NATIVE_NOT_ALLOWED
public static final String ERR_JS_TYPE_WITH_PROTOTYPE_SET_NOT_ALLOWED_ON_CLASS_TYPES
public static void check(JSORestrictionsChecker.CheckerState state, org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration cud)
CompilationUnitDeclaration
.public static boolean isJso(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding)
true
if typeBinding
is JavaScriptObject
or
any subtype.public static boolean isJsoSubclass(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding)
true
if typeBinding
is a subtype of
JavaScriptObject
, but not JavaScriptObject
itself.Copyright © 2018. All rights reserved.