本文整理了Java中org.mozilla.javascript.Node.getType()
方法的一些代码示例,展示了Node.getType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getType()
方法的具体详情如下:
包路径:org.mozilla.javascript.Node
类名称:Node
方法名:getType
暂无
代码示例来源:origin: rhino/js
private static boolean isArithmeticNode(Node node)
{
int type = node.getType();
return (type == Token.SUB)
|| (type == Token.MOD)
|| (type == Token.DIV)
|| (type == Token.MUL);
}
代码示例来源:origin: geogebra/geogebra
private static boolean isArithmeticNode(Node node)
{
int type = node.getType();
return (type == Token.SUB)
|| (type == Token.MOD)
|| (type == Token.DIV)
|| (type == Token.MUL);
}
代码示例来源:origin: io.apigee/rhino
private static boolean isArithmeticNode(Node node)
{
int type = node.getType();
return (type == Token.SUB)
|| (type == Token.MOD)
|| (type == Token.DIV)
|| (type == Token.MUL);
}
代码示例来源:origin: rhino/js
private int nodeIsDirectCallParameter(Node node)
{
if (node.getType() == Token.GETVAR
&& inDirectCallFunction && !itsForcedObjectParameters)
{
int varIndex = fnCurrent.getVarIndex(node);
if (fnCurrent.isParameter(varIndex)) {
return varRegisters[varIndex];
}
}
return -1;
}
代码示例来源:origin: geogebra/geogebra
private int nodeIsDirectCallParameter(Node node)
{
if (node.getType() == Token.GETVAR
&& inDirectCallFunction && !itsForcedObjectParameters)
{
int varIndex = fnCurrent.getVarIndex(node);
if (fnCurrent.isParameter(varIndex)) {
return varRegisters[varIndex];
}
}
return -1;
}
代码示例来源:origin: geogebra/geogebra
private void markDCPNumberContext(Node n)
{
if (inDirectCallFunction && n.getType() == Token.GETVAR) {
int varIndex = theFunction.getVarIndex(n);
if (theFunction.isParameter(varIndex)) {
parameterUsedInNumberContext = true;
}
}
}
代码示例来源:origin: rhino/js
private void markDCPNumberContext(Node n)
{
if (inDirectCallFunction && n.getType() == Token.GETVAR) {
int varIndex = theFunction.getVarIndex(n);
if (theFunction.isParameter(varIndex)) {
parameterUsedInNumberContext = true;
}
}
}
代码示例来源:origin: io.apigee/rhino
private int nodeIsDirectCallParameter(Node node)
{
if (node.getType() == Token.GETVAR
&& inDirectCallFunction && !itsForcedObjectParameters)
{
int varIndex = fnCurrent.getVarIndex(node);
if (fnCurrent.isParameter(varIndex)) {
return varRegisters[varIndex];
}
}
return -1;
}
代码示例来源:origin: com.github.tntim96/rhino
private void markDCPNumberContext(Node n)
{
if (inDirectCallFunction && n.getType() == Token.GETVAR) {
int varIndex = theFunction.getVarIndex(n);
if (theFunction.isParameter(varIndex)) {
parameterUsedInNumberContext = true;
}
}
}
代码示例来源:origin: rhino/js
private boolean convertParameter(Node n)
{
if (inDirectCallFunction && n.getType() == Token.GETVAR) {
int varIndex = theFunction.getVarIndex(n);
if (theFunction.isParameter(varIndex)) {
n.removeProp(Node.ISNUMBER_PROP);
return true;
}
}
return false;
}
代码示例来源:origin: rhino/js
Node createUseLocal(Node localBlock)
{
if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug();
Node result = new Node(Token.LOCAL_LOAD);
result.putProp(Node.LOCAL_BLOCK_PROP, localBlock);
return result;
}
代码示例来源:origin: geogebra/geogebra
private boolean convertParameter(Node n)
{
if (inDirectCallFunction && n.getType() == Token.GETVAR) {
int varIndex = theFunction.getVarIndex(n);
if (theFunction.isParameter(varIndex)) {
n.removeProp(Node.ISNUMBER_PROP);
return true;
}
}
return false;
}
代码示例来源:origin: geogebra/geogebra
public void setDefault(Node defaultTarget)
{
if (type != Token.SWITCH) codeBug();
if (defaultTarget.getType() != Token.TARGET) codeBug();
if (target2 != null) codeBug(); //only once
target2 = defaultTarget;
}
代码示例来源:origin: geogebra/geogebra
public void setFinally(Node finallyTarget)
{
if (type != Token.TRY) codeBug();
if (finallyTarget.getType() != Token.TARGET) codeBug();
if (target2 != null) codeBug(); //only once
target2 = finallyTarget;
}
代码示例来源:origin: wala/WALA
private static boolean isPrimitiveCreation(WalkContext context, NewExpression n) {
Node target = getNewTarget(n);
return isPrologueScript(context) && n.getType() == Token.NEW && target.getType() == Token.NAME
&& target.getString().equals("Primitives");
}
代码示例来源:origin: rhino/js
/**
* Continue (possibly labeled)
*/
Node createContinue(Node loop, int lineno)
{
if (loop.getType() != Token.LOOP) Kit.codeBug();
Node.Jump n = new Node.Jump(Token.CONTINUE, lineno);
n.setJumpStatement((Node.Jump)loop);
return n;
}
代码示例来源:origin: ro.isdc.wro4j/rhino
private Node createUseLocal(Node localBlock) {
if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug();
Node result = new Node(Token.LOCAL_LOAD);
result.putProp(Node.LOCAL_BLOCK_PROP, localBlock);
return result;
}
代码示例来源:origin: com.github.tntim96/rhino
private boolean convertParameter(Node n)
{
if (inDirectCallFunction && n.getType() == Token.GETVAR) {
int varIndex = theFunction.getVarIndex(n);
if (theFunction.isParameter(varIndex)) {
n.removeProp(Node.ISNUMBER_PROP);
return true;
}
}
return false;
}
代码示例来源:origin: ro.isdc.wro4j/rhino
public void setContinue(Node continueTarget)
{
if (type != Token.LOOP) codeBug();
if (continueTarget.getType() != Token.TARGET) codeBug();
if (target2 != null) codeBug(); //only once
target2 = continueTarget;
}
代码示例来源:origin: wala/WALA
/**
* is n a call to "primitive" within our synthetic modeling code?
*/
private static boolean isPrimitiveCall(WalkContext context, FunctionCall n) {
return isPrologueScript(context) && n.getType() == Token.CALL && getCallTarget(n).getType() == Token.NAME
&& getCallTarget(n).getString().equals("primitive");
}
内容来源于网络,如有侵权,请联系作者删除!