| Modifier and Type | Interface and Description |
|---|---|
interface |
CheckContributor<T extends com.sun.source.tree.Tree>
this interface is to be implemented by all the check contributors
|
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayTypeForbiddenCheck
this class checks that you don't use java arrays in the code (the only exception is the main method - but maybe this
only should also be forbidden).
|
class |
ClassDuplicateMemberNameCheck
checks the a field name or method exists only once in the class and its hierchy
|
class |
ClassEnumWithoutMembersCheck
this class checks that no member is added to an enum declaration (other than of course the enum constants)
|
class |
ClassForbidExtendsSyntheticTypeCheck
this checks that a class or interface does not try to extend or implement a
SyntheticType as the code for this class does not exist in reality, so the
calls to any method of such a type may end up in a runtime error. |
class |
ClassGlobalForbidInnerCheck
as for @GlobalScope - forbid inner types of global classes - they make no sense
|
class |
ClassGlobalInstanceMembersCheck
as for @GlobalScope - global classes, there is not class declaration, the members are attached directly to the
JavaScript global object (i.e.
|
class |
ClassImplementJavascriptFunctionCheck
check that a class does not implement a @JavaScript annotated interface as this is reserved to build inline
functions.
|
class |
ClassNamespaceCheck
this check makes sure the names used to define a namespace are JavaScript correctly defined variables, as they will
be used as such
|
class |
FieldInitializerCheck |
class |
MethodDeclarationTemplateCheck
this class verifies that you use @Template only inside a bridge
|
class |
MethodOverloadCheck
this check verifies that only one method (or constructor) with a given name has actually a body, all the other should be marked as native (or
|
class |
MethodSynchronizedCheck
this class checks that you don't have synchornized methods, as this feature is not supported in JavaScript
|
class |
MethodVarArgParamCheck |
class |
MethodWrongNameCheck |
| Modifier and Type | Class and Description |
|---|---|
class |
IdentifierAccessOuterScopeCheck |
class |
IdentifierAccessServerSideCheck |
class |
IdentifierGlobalScopeNameClashCheck
this class checks that you don't use in the same method variables or parameters with the same name as a global scoped
field.
|
class |
MemberSelectGlobalScopeNameClashCheck |
class |
MemberSelectOuterScopeCheck
this check that you don't try to access the outer this using Type.this.
|
class |
MemberSelectServerSideCheck |
class |
MethodInvocationMapConstructorCheck
this class checks that you use only literals for a map key: i.e.
|
class |
MethodInvocationOuterScopeCheck
this check verifies that you don't call a method from the outer type as in javaScript this scope is not accessible.
|
class |
MethodInvocationServerSideCheck
this check verifies that you don't call a method from the outer type as in javaScript this scope is not accessible.
|
class |
MethodInvocationSuperSynthCheck
this check verifies that you don't call a method from the super type if that is a synthetic type, as the actual
definition of this type does not exist.
|
class |
NewArrayForbiddenCheck
this checks that no java array is used.
|
class |
NewClassInlineFunctionCheck |
class |
NewClassObjectInitCheck
this class checks that only field assignment are present in the initialization like this:
new Type(){{x = 1; y = 2; }}; |
| Modifier and Type | Class and Description |
|---|---|
class |
AssertCheck
Java asserts don't have an equivalent - at language level in JavaScript
|
class |
BlockInstanceCheck
this class checks that you cannot have instance initializer blocks (other than the one for special double brace
construction) as you can have only a constructor in a JavaScript class-like construction.
|
class |
SynchronizedCheck
ths synchronized blocks are illegal, as there is no threading model in JavaScript
|
class |
VariableFinalInLoopCheck
This check class verifies that all final variables are declared at the method level, as the block scope does not
exists in JavaScript.
|
class |
VariableWrongNameCheck
check that no JavaScript keyword (that is not a Java keyword) is used as a variable name
|
| Modifier and Type | Method and Description |
|---|---|
<T extends com.sun.source.tree.Tree,C extends VisitorContributor<T,R,P,V>,N> |
TreePathScannerContributors.contribute(C contributor) |
<T extends com.sun.source.tree.Tree,C extends VisitorContributor<T,R,P,V>,N> |
TreePathScannerContributors.contribute(C contributor,
Class<T> nodeClass) |
<T extends com.sun.source.tree.Tree,C extends VisitorContributor<T,R,P,V>> |
TreePathScannerContributors.contribute(DiscriminatorKey discriminatorKey,
C contributor) |
| Modifier and Type | Method and Description |
|---|---|
R |
VisitorFilterContributor.visit(V visitor,
T tree,
P p,
VisitorContributor<T,R,P,V> chain) |
| Modifier and Type | Interface and Description |
|---|---|
interface |
WriterContributor<T extends com.sun.source.tree.Tree,R> |
| Modifier and Type | Class and Description |
|---|---|
class |
CompilationUnitWriter<JS> |
| Modifier and Type | Method and Description |
|---|---|
JS |
CommentWriter.visit(WriterVisitor<JS> visitor,
com.sun.source.tree.Tree tree,
GenerationContext<JS> context,
VisitorContributor<com.sun.source.tree.Tree,JS,GenerationContext<JS>,WriterVisitor<JS>> chain) |
| Modifier and Type | Class and Description |
|---|---|
class |
ClassWriter<JS> |
class |
FieldWriter<JS>
This will add the declaration of a field.
|
class |
MethodWriter<JS> |
| Modifier and Type | Class and Description |
|---|---|
class |
ArrayAccessWriter<JS>
array access -> used only in very specific case, otherwise the arrays are forbidden
|
class |
AssignmentWriter<JS> |
class |
BinaryWriter<JS> |
class |
CompoundAssignmentWriter<JS> |
class |
ConditionalWriter<JS>
conditional expr - as in java
|
class |
IdentifierWriter<JS>
this class deal with identifiers likes variable, field references.
|
class |
InstanceofWriter<JS> |
class |
LiteralWriter<JS> |
class |
MemberSelectWriter<JS>
write member select access, for fields, types and methods.
|
class |
MethodInvocationWriter<JS> |
class |
NewArrayWriter<JS>
useless as arrays are supposed to be checked before
|
class |
NewClassWriter<JS> |
class |
ParenthesizedWriter<JS> |
class |
TypeCastWriter<JS> |
class |
UnaryWriter<JS>
Java unary operator
|
| Modifier and Type | Class and Description |
|---|---|
class |
AssertWriter<JS>
asserts - not supported
|
class |
BlockWriter<JS>
regular blocks.
|
class |
BreakWriter<JS> |
class |
CaseWriter<JS> |
class |
CatchWriter<JS> |
class |
ContinueWriter<JS> |
class |
DoWhileLoopWriter<JS> |
class |
EmptyStatementWriter<JS> |
class |
EnhancedForLoopWriter<JS>
generates from
|
class |
ExpressionStatementWriter<JS> |
class |
ForLoopWriter<JS> |
class |
IfWriter<JS> |
class |
LabeledStatementWriter<JS> |
class |
ReturnWriter<JS> |
class |
SwitchWriter<JS>
switch
|
class |
SynchronizedWriter<JS>
Synchronized blocks are not allowed
|
class |
ThrowWriter<JS> |
class |
TryWriter<JS>
Try blocks -> as in java
|
class |
VariableWriter<JS>
variable declaration.
|
class |
WhileLoopWriter<JS>
while loop - as in Java
|
| Modifier and Type | Class and Description |
|---|---|
class |
AdapterTemplate<JS>
method(x, arg1, arg2) -> x.method(arg1, arg2)
|
class |
ArrayTemplate<JS>
$array() -> []
|
class |
AssertTemplate<JS>
This template generate a code that allows you to add into the javascript file the original java code and its position
in the source file.
|
class |
DefaultTemplate<JS>
this is the standard generation template
|
class |
DeleteTemplate<JS>
map.$delete(key) -> delete map[key]
|
class |
GetTemplate<JS>
array.$get(x) -> array[x], or $get(obj, prop) -> obj[prop]
|
class |
InvokeTemplate<JS>
x.$invoke(a,b) -> x(a,b)
|
class |
JsTemplate<JS>
$js("code") -> code
|
class |
MapTemplate<JS>
$map(n1, v1, n2, v2) -> {n1: v1, n2: v2}
|
class |
MethodToPropertyTemplate<JS>
$method() => $method and
$method(x) => $method = x and $staticMethod(x) => x.$method and $staticMethod(x, y) => x.$method = y |
class |
OrTemplate<JS>
$or(x, y, z) -> (x || y || z)
|
class |
PrefixTemplate<JS>
This template can be used to prefix the name of a method that can be Java keyword.
When used without parameters as @Template("prefix"), this template simply strips the leading character of the Java method name $method() => method() or _method() => method() When used with a single parameters, this template removes the first param.length characters from the java method name and makes the first letter of the resulting identifier lowercase |
class |
PropertiesTemplate<JS>
$properties(obj) -> obj
|
class |
PutTemplate<JS>
array.$set(index, value) -> array[index] = value, or $set(obj, prop, value) -> obj[prop]=value
|
class |
SetTemplate<JS>
the same as put
|
class |
SuffixTemplate<JS>
This template can be used to suffix the name of a method that can be Java keyword.
When used without parameters as @Template("suffix"), this template simply strips the trailing character of the Java method name method_() => method() or method$() => method() When used with a single parameters, this template removes the last param.length characters |
class |
TypeOfTemplate<JS>
$typeOf(arg) -> (typeof arg)
|
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultAssignmentTemplate<JS> |
class |
DefaultCompoundAssignmentTemplate<JS> |
class |
DefaultIdentifierTemplate<JS>
this class deal with identifiers likes variable, field references.
|
class |
DefaultMemberSelectTemplate<JS>
write member select access, for fields, types and methods.
|
class |
DefaultUnaryTemplate<JS>
Java unary operator
|
class |
GetterIdentifierTemplate<JS> |
class |
GetterMemberSelectTemplate<JS>
write member select access, for fields, types and methods.
|
class |
GlobalGetterIdentifierTemplate<JS> |
class |
GlobalGetterMemberSelectTemplate<JS>
write member select access, for fields, types and methods.
|
class |
GlobalSetterAssignmentTemplate<JS> |
class |
GlobalSetterCompoundAssignmentTemplate<JS>
Java unary operator
|
class |
GlobalSetterUnaryTemplate<JS>
Java unary operator
|
class |
SetterAssignmentTemplate<JS> |
class |
SetterCompoundAssignmentTemplate<JS> |
class |
SetterUnaryTemplate<JS>
Java unary operator
|
Copyright © 2015. All Rights Reserved.