org.stjs.generator.javac
Class TreeWrapper<T extends com.sun.source.tree.Tree,JS>
java.lang.Object
org.stjs.generator.javac.TreeWrapper<T,JS>
public class TreeWrapper<T extends com.sun.source.tree.Tree,JS>
- extends Object
this class is a wrapper around a Tree node to give you easier access to the most important methods of the
elements in the AST
- Author:
- acraciun
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeWrapper
public TreeWrapper(@Nonnull
com.sun.source.util.TreePath path,
@Nonnull
GenerationContext<JS> context)
TreeWrapper
public TreeWrapper(@Nonnull
Element element,
@Nonnull
com.sun.source.util.TreePath path,
@Nonnull
GenerationContext<JS> context)
getTree
public T getTree()
getPath
public com.sun.source.util.TreePath getPath()
getContext
public GenerationContext<JS> getContext()
isFinal
public boolean isFinal()
isStatic
public boolean isStatic()
isSuper
public boolean isSuper()
isPrimitiveType
public boolean isPrimitiveType()
isJavaScriptFunction
public boolean isJavaScriptFunction()
isGlobal
public boolean isGlobal()
getNamespace
public String getNamespace()
isInnerType
public boolean isInnerType()
child
public <C extends com.sun.source.tree.Tree> TreeWrapper<C,JS> child(C child)
parent
public <P extends com.sun.source.tree.Tree> TreeWrapper<P,JS> parent()
isSyntheticType
public boolean isSyntheticType()
isNative
public boolean isNative()
isJavaScriptPrimitive
public boolean isJavaScriptPrimitive()
getElement
public Element getElement()
getEnclosingType
public TreeWrapper<com.sun.source.tree.ClassTree,JS> getEnclosingType()
getCurrentType
public TreeWrapper<com.sun.source.tree.ClassTree,JS> getCurrentType()
getTypeName
public String getTypeName()
- Returns:
- the type's name if the tree belongs to a type, undefined otherwise
addError
public void addError(String message)
getMethodTemplate
public String getMethodTemplate()
Copyright © 2014. All Rights Reserved.