org.mozilla.javascript.Node.putProp()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 JavaScript  
字(7.6k)|赞(0)|评价(0)|浏览(320)

本文整理了Java中org.mozilla.javascript.Node.putProp()方法的一些代码示例,展示了Node.putProp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.putProp()方法的具体详情如下:
包路径:org.mozilla.javascript.Node
类名称:Node
方法名:putProp

Node.putProp介绍

暂无

代码示例

代码示例来源:origin: geogebra/geogebra

  1. /**
  2. * Sets the JsDoc comment string attached to this node.
  3. */
  4. public void setJsDocNode(Comment jsdocNode) {
  5. putProp(JSDOC_PROP, jsdocNode);
  6. }

代码示例来源:origin: io.apigee/rhino

  1. /**
  2. * Sets the JsDoc comment string attached to this node.
  3. */
  4. public void setJsDocNode(Comment jsdocNode) {
  5. putProp(JSDOC_PROP, jsdocNode);
  6. }

代码示例来源:origin: ro.isdc.wro4j/rhino

  1. /**
  2. * Sets the JsDoc comment string attached to this node.
  3. */
  4. public void setJsDocNode(Comment jsdocNode) {
  5. putProp(JSDOC_PROP, jsdocNode);
  6. }

代码示例来源:origin: com.github.tntim96/rhino

  1. /**
  2. * Sets the JsDoc comment string attached to this node.
  3. */
  4. public void setJsDocNode(Comment jsdocNode) {
  5. putProp(JSDOC_PROP, jsdocNode);
  6. }

代码示例来源:origin: rhino/js

  1. Node createUseLocal(Node localBlock)
  2. {
  3. if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug();
  4. Node result = new Node(Token.LOCAL_LOAD);
  5. result.putProp(Node.LOCAL_BLOCK_PROP, localBlock);
  6. return result;
  7. }

代码示例来源:origin: ro.isdc.wro4j/rhino

  1. private Node createUseLocal(Node localBlock) {
  2. if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug();
  3. Node result = new Node(Token.LOCAL_LOAD);
  4. result.putProp(Node.LOCAL_BLOCK_PROP, localBlock);
  5. return result;
  6. }

代码示例来源:origin: com.github.tntim96/rhino

  1. private Node createUseLocal(Node localBlock) {
  2. if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug();
  3. Node result = new Node(Token.LOCAL_LOAD);
  4. result.putProp(Node.LOCAL_BLOCK_PROP, localBlock);
  5. return result;
  6. }

代码示例来源:origin: com.sun.phobos/phobos-rhino

  1. Node createUseLocal(Node localBlock)
  2. {
  3. if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug();
  4. Node result = new Node(Token.LOCAL_LOAD);
  5. result.putProp(Node.LOCAL_BLOCK_PROP, localBlock);
  6. return result;
  7. }

代码示例来源:origin: geogebra/geogebra

  1. private Node createUseLocal(Node localBlock) {
  2. if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug();
  3. Node result = new Node(Token.LOCAL_LOAD);
  4. result.putProp(Node.LOCAL_BLOCK_PROP, localBlock);
  5. return result;
  6. }

代码示例来源:origin: io.apigee/rhino

  1. private Node createUseLocal(Node localBlock) {
  2. if (Token.LOCAL_BLOCK != localBlock.getType()) throw Kit.codeBug();
  3. Node result = new Node(Token.LOCAL_LOAD);
  4. result.putProp(Node.LOCAL_BLOCK_PROP, localBlock);
  5. return result;
  6. }

代码示例来源:origin: io.apigee/rhino

  1. private Node transformParenExpr(ParenthesizedExpression node) {
  2. AstNode expr = node.getExpression();
  3. decompiler.addToken(Token.LP);
  4. int count = 1;
  5. while (expr instanceof ParenthesizedExpression) {
  6. decompiler.addToken(Token.LP);
  7. count++;
  8. expr = ((ParenthesizedExpression)expr).getExpression();
  9. }
  10. Node result = transform(expr);
  11. for (int i = 0; i < count; i++) {
  12. decompiler.addToken(Token.RP);
  13. }
  14. result.putProp(Node.PARENTHESIZED_PROP, Boolean.TRUE);
  15. return result;
  16. }

代码示例来源:origin: ro.isdc.wro4j/rhino

  1. private Node transformParenExpr(ParenthesizedExpression node) {
  2. AstNode expr = node.getExpression();
  3. decompiler.addToken(Token.LP);
  4. int count = 1;
  5. while (expr instanceof ParenthesizedExpression) {
  6. decompiler.addToken(Token.LP);
  7. count++;
  8. expr = ((ParenthesizedExpression)expr).getExpression();
  9. }
  10. Node result = transform(expr);
  11. for (int i = 0; i < count; i++) {
  12. decompiler.addToken(Token.RP);
  13. }
  14. result.putProp(Node.PARENTHESIZED_PROP, Boolean.TRUE);
  15. return result;
  16. }

代码示例来源:origin: com.github.tntim96/rhino

  1. private Node transformParenExpr(ParenthesizedExpression node) {
  2. AstNode expr = node.getExpression();
  3. decompiler.addToken(Token.LP);
  4. int count = 1;
  5. while (expr instanceof ParenthesizedExpression) {
  6. decompiler.addToken(Token.LP);
  7. count++;
  8. expr = ((ParenthesizedExpression)expr).getExpression();
  9. }
  10. Node result = transform(expr);
  11. for (int i = 0; i < count; i++) {
  12. decompiler.addToken(Token.RP);
  13. }
  14. result.putProp(Node.PARENTHESIZED_PROP, Boolean.TRUE);
  15. return result;
  16. }

代码示例来源:origin: geogebra/geogebra

  1. private Node transformParenExpr(ParenthesizedExpression node) {
  2. AstNode expr = node.getExpression();
  3. decompiler.addToken(Token.LP);
  4. int count = 1;
  5. while (expr instanceof ParenthesizedExpression) {
  6. decompiler.addToken(Token.LP);
  7. count++;
  8. expr = ((ParenthesizedExpression)expr).getExpression();
  9. }
  10. Node result = transform(expr);
  11. for (int i = 0; i < count; i++) {
  12. decompiler.addToken(Token.RP);
  13. }
  14. result.putProp(Node.PARENTHESIZED_PROP, Boolean.TRUE);
  15. return result;
  16. }

代码示例来源:origin: rhino/js

  1. Node createPropertyGet(Node target, String namespace, String name,
  2. int memberTypeFlags)
  3. {
  4. if (namespace == null && memberTypeFlags == 0) {
  5. if (target == null) {
  6. return createName(name);
  7. }
  8. checkActivationName(name, Token.GETPROP);
  9. if (ScriptRuntime.isSpecialProperty(name)) {
  10. Node ref = new Node(Token.REF_SPECIAL, target);
  11. ref.putProp(Node.NAME_PROP, name);
  12. return new Node(Token.GET_REF, ref);
  13. }
  14. return new Node(Token.GETPROP, target, createString(name));
  15. }
  16. Node elem = createString(name);
  17. memberTypeFlags |= Node.PROPERTY_FLAG;
  18. return createMemberRefGet(target, namespace, elem, memberTypeFlags);
  19. }

代码示例来源:origin: com.sun.phobos/phobos-rhino

  1. Node createPropertyGet(Node target, String namespace, String name,
  2. int memberTypeFlags)
  3. {
  4. if (namespace == null && memberTypeFlags == 0) {
  5. if (target == null) {
  6. return createName(name);
  7. }
  8. checkActivationName(name, Token.GETPROP);
  9. if (ScriptRuntime.isSpecialProperty(name)) {
  10. Node ref = new Node(Token.REF_SPECIAL, target);
  11. ref.putProp(Node.NAME_PROP, name);
  12. return new Node(Token.GET_REF, ref);
  13. }
  14. return new Node(Token.GETPROP, target, createString(name));
  15. }
  16. Node elem = createString(name);
  17. memberTypeFlags |= Node.PROPERTY_FLAG;
  18. return createMemberRefGet(target, namespace, elem, memberTypeFlags);
  19. }

代码示例来源:origin: io.apigee/rhino

  1. private Node createPropertyGet(Node target, String namespace, String name,
  2. int memberTypeFlags)
  3. {
  4. if (namespace == null && memberTypeFlags == 0) {
  5. if (target == null) {
  6. return createName(name);
  7. }
  8. checkActivationName(name, Token.GETPROP);
  9. if (ScriptRuntime.isSpecialProperty(name)) {
  10. Node ref = new Node(Token.REF_SPECIAL, target);
  11. ref.putProp(Node.NAME_PROP, name);
  12. return new Node(Token.GET_REF, ref);
  13. }
  14. return new Node(Token.GETPROP, target, Node.newString(name));
  15. }
  16. Node elem = Node.newString(name);
  17. memberTypeFlags |= Node.PROPERTY_FLAG;
  18. return createMemberRefGet(target, namespace, elem, memberTypeFlags);
  19. }

代码示例来源:origin: geogebra/geogebra

  1. private Node createPropertyGet(Node target, String namespace, String name,
  2. int memberTypeFlags)
  3. {
  4. if (namespace == null && memberTypeFlags == 0) {
  5. if (target == null) {
  6. return createName(name);
  7. }
  8. checkActivationName(name, Token.GETPROP);
  9. if (ScriptRuntime.isSpecialProperty(name)) {
  10. Node ref = new Node(Token.REF_SPECIAL, target);
  11. ref.putProp(Node.NAME_PROP, name);
  12. return new Node(Token.GET_REF, ref);
  13. }
  14. return new Node(Token.GETPROP, target, Node.newString(name));
  15. }
  16. Node elem = Node.newString(name);
  17. memberTypeFlags |= Node.PROPERTY_FLAG;
  18. return createMemberRefGet(target, namespace, elem, memberTypeFlags);
  19. }

代码示例来源:origin: ro.isdc.wro4j/rhino

  1. private Node createPropertyGet(Node target, String namespace, String name,
  2. int memberTypeFlags)
  3. {
  4. if (namespace == null && memberTypeFlags == 0) {
  5. if (target == null) {
  6. return createName(name);
  7. }
  8. checkActivationName(name, Token.GETPROP);
  9. if (ScriptRuntime.isSpecialProperty(name)) {
  10. Node ref = new Node(Token.REF_SPECIAL, target);
  11. ref.putProp(Node.NAME_PROP, name);
  12. return new Node(Token.GET_REF, ref);
  13. }
  14. return new Node(Token.GETPROP, target, Node.newString(name));
  15. }
  16. Node elem = Node.newString(name);
  17. memberTypeFlags |= Node.PROPERTY_FLAG;
  18. return createMemberRefGet(target, namespace, elem, memberTypeFlags);
  19. }

代码示例来源:origin: com.github.tntim96/rhino

  1. private Node createPropertyGet(Node target, String namespace, String name,
  2. int memberTypeFlags)
  3. {
  4. if (namespace == null && memberTypeFlags == 0) {
  5. if (target == null) {
  6. return createName(name);
  7. }
  8. checkActivationName(name, Token.GETPROP);
  9. if (ScriptRuntime.isSpecialProperty(name)) {
  10. Node ref = new Node(Token.REF_SPECIAL, target);
  11. ref.putProp(Node.NAME_PROP, name);
  12. return new Node(Token.GET_REF, ref);
  13. }
  14. return new Node(Token.GETPROP, target, Node.newString(name));
  15. }
  16. Node elem = Node.newString(name);
  17. memberTypeFlags |= Node.PROPERTY_FLAG;
  18. return createMemberRefGet(target, namespace, elem, memberTypeFlags);
  19. }

相关文章