Here you can find the source of getStringValue(AstNode element)
static public String getStringValue(AstNode element)
//package com.java2s; //License from project: Open Source License import org.mozilla.javascript.ast.AstNode; import org.mozilla.javascript.ast.KeywordLiteral; import org.mozilla.javascript.ast.Name; import org.mozilla.javascript.ast.StringLiteral; public class Main { static public String getStringValue(AstNode element) { if (element instanceof StringLiteral) return ((StringLiteral) element).getValue(); if (element instanceof KeywordLiteral) return ((KeywordLiteral) element).toSource(); if (element instanceof Name) return ((Name) element).getIdentifier(); return ""; }/* w ww .j av a 2 s . co m*/ }