public class JsniMethodBody extends JAbstractMethodBody
method
Constructor and Description |
---|
JsniMethodBody(SourceInfo info) |
JsniMethodBody(SourceInfo info,
JsFunction function,
List<JsniClassLiteral> classRefs,
List<JsniFieldRef> jsniFieldRefs,
List<JsniMethodRef> jsniMethodRefs,
Set<String> stringLiterals) |
Modifier and Type | Method and Description |
---|---|
void |
addClassRef(JsniClassLiteral ref)
Adds a reference from this method to a Java class literal.
|
void |
addJsniRef(JsniFieldRef ref)
Adds a reference from this method to a Java field.
|
void |
addJsniRef(JsniMethodRef ref)
Adds a reference from this method to a Java method.
|
List<JsniClassLiteral> |
getClassRefs()
Return this method's references to Java class literals.
|
JsFunction |
getFunc() |
List<JsniFieldRef> |
getJsniFieldRefs()
Return this method's references to Java fields.
|
List<JsniMethodRef> |
getJsniMethodRefs()
Return this method's references to Java methods.
|
Set<String> |
getUsedStrings() |
boolean |
isNative() |
void |
setFunc(JsFunction jsFunction) |
void |
traverse(JVisitor visitor,
Context ctx)
Causes this object to have the visitor visit itself and its children.
|
getMethod, setMethod
getSourceInfo, setSourceInfo, toSource, toString
public JsniMethodBody(SourceInfo info)
public JsniMethodBody(SourceInfo info, JsFunction function, List<JsniClassLiteral> classRefs, List<JsniFieldRef> jsniFieldRefs, List<JsniMethodRef> jsniMethodRefs, Set<String> stringLiterals)
public void addClassRef(JsniClassLiteral ref)
public void addJsniRef(JsniFieldRef ref)
public void addJsniRef(JsniMethodRef ref)
public List<JsniClassLiteral> getClassRefs()
public JsFunction getFunc()
public List<JsniFieldRef> getJsniFieldRefs()
public List<JsniMethodRef> getJsniMethodRefs()
public boolean isNative()
isNative
in class JAbstractMethodBody
public void setFunc(JsFunction jsFunction)
public void traverse(JVisitor visitor, Context ctx)
JVisitable
visitor
- the visitor that should traverse this nodectx
- the context of an existing traversalCopyright © 2018. All rights reserved.