List of usage examples for org.antlr.v4.runtime RuleContext getPayload
@Override
public RuleContext getPayload()
From source file:de.dfki.resc28.ole.bootstrap.Util.java
public static Literal toStringLiteral(RuleContext ctx, String separator) { if (ctx != null) { String descr[] = new String[ctx.getPayload().getChildCount()]; for (int i = 0; i < ctx.getPayload().getChildCount(); i++) { descr[i] = ctx.getPayload().getChild(i).getText(); }//w w w .ja v a 2 s. c om return ResourceFactory.createTypedLiteral(StringUtils.join(descr, separator), XSDDatatype.XSDstring); } else { return ResourceFactory.createPlainLiteral("Something went wrong!"); } }