private void parseGraph(boolean compile, Class type, ParserContext pCtx) { CollectionParser parser = new CollectionParser(); if (type == null) { collectionGraph = ((List) parser.parseCollection(expr, start, offset, compile, pCtx)).get(0); } else { collectionGraph = ((List) parser.parseCollection(expr, start, offset, compile, type, pCtx)).get(0); } trailingStart = parser.getCursor() + 2; trailingOffset = offset - (trailingStart - start); if (this.egressType == null) this.egressType = collectionGraph.getClass(); }
Object o = new CollectionParser(newType).parseCollection(subset(property, (start = cursor) + 1, cursor = balancedCapture(property, start, property[start])), subcompile, colType, pCtx); subCompile(ex); subCompile((String) curr); if (subcompile) subCompile(ex);
Object o = new CollectionParser(newType).parseCollection(property, (st = cursor) + 1, (cursor = balancedCapture(property, st, end, property[st])) - st - 1, subcompile, colType, pCtx); subCompile(st, cursor - st); subCompile(st, cursor - st); if (subcompile) subCompile(st, cursor - st);
public Object parseCollection(char[] property, int start, int offset, boolean subcompile, ParserContext pCtx) { this.property = property; this.pCtx = pCtx; this.end = start + offset; while (start < end && isWhitespace(property[start])) { start++; } this.start = this.cursor = start; return parseCollection(subcompile); }
private void subCompile(String ex) { if (colType == null) { subCompileExpression(ex.toCharArray(), pCtx); } else { Class r = ((ExecutableStatement) subCompileExpression(ex.toCharArray(), pCtx)).getKnownEgressType(); if (!colType.isAssignableFrom(r) && (isStrongType() || !DataConversion.canConvert(r, colType))) { throw new CompileException("expected type: " + colType.getName() + "; but found: " + r.getName()); } } }
Object o = new CollectionParser(newType).parseCollection(property, (st = cursor) + 1, (cursor = balancedCapture(property, st, end, property[st])) - st - 1, subcompile, colType, pCtx); subCompile(st, cursor - st); subCompile(st, cursor - st); if (subcompile) subCompile(st, cursor - st);
public Object parseCollection(char[] property, boolean subcompile, ParserContext pCtx) { this.cursor = 0; this.pCtx = pCtx; if ((this.length = (this.property = property).length) > 0) while (length > 0 && isWhitespace(property[length - 1])) length--; return parseCollection(subcompile); }
private void subCompile(int start, int offset) { if (colType == null) { subCompileExpression(property, start, offset, pCtx); } else { Class r = ((ExecutableStatement) subCompileExpression(property, start, offset, pCtx)).getKnownEgressType(); if (r != null && !isAssignableFrom(colType, r) && (isStrongType() || !DataConversion.canConvert(r, colType))) { throw new CompileException("expected type: " + colType.getName() + "; but found: " + r.getName(), property, cursor); } } }
private void parseGraph(boolean compile, Class type, ParserContext pCtx) { CollectionParser parser = new CollectionParser(); if (type == null) { collectionGraph = ((List) parser.parseCollection(expr, start, offset, compile, pCtx)).get(0); } else { collectionGraph = ((List) parser.parseCollection(expr, start, offset, compile, type, pCtx)).get(0); } trailingStart = parser.getCursor() + 2; trailingOffset = offset - (trailingStart - start); if (this.egressType == null) this.egressType = collectionGraph.getClass(); }
public Object parseCollection(char[] property, int start, int offset, boolean subcompile, ParserContext pCtx) { this.property = property; this.pCtx = pCtx; this.end = start + offset; while (start < end && isWhitespace(property[start])) { start++; } this.start = this.cursor = start; return parseCollection(subcompile); }
private void subCompile(int start, int offset) { if (colType == null) { subCompileExpression(property, start, offset, pCtx); } else { Class r = ((ExecutableStatement) subCompileExpression(property, start, offset, pCtx)).getKnownEgressType(); if (r != null && !isAssignableFrom(colType, r) && (isStrongType() || !DataConversion.canConvert(r, colType))) { throw new CompileException("expected type: " + colType.getName() + "; but found: " + r.getName(), property, cursor); } } }
private void parseGraph(boolean compile, Class type, ParserContext pCtx) { CollectionParser parser = new CollectionParser(); if (type == null) { collectionGraph = ((List) parser.parseCollection(name, compile, pCtx)).get(0); } else { collectionGraph = ((List) parser.parseCollection(name, compile, type, pCtx)).get(0); } if (parser.getCursor() + 2 < name.length) trailing = subset(name, parser.getCursor() + 2); if (this.egressType == null) this.egressType = collectionGraph.getClass(); }
public Object parseCollection(char[] property, int start, int offset, boolean subcompile, Class colType, ParserContext pCtx) { if (colType != null) this.colType = getBaseComponentType(colType); this.property = property; this.end = start + offset; while (start < end && isWhitespace(property[start])) { start++; } this.start = this.cursor = start; this.pCtx = pCtx; return parseCollection(subcompile); }
public Object parseCollection(char[] property, int start, int offset, boolean subcompile, Class colType, ParserContext pCtx) { if (colType != null) this.colType = getBaseComponentType(colType); this.property = property; this.end = start + offset; while (start < end && isWhitespace(property[start])) { start++; } this.start = this.cursor = start; this.pCtx = pCtx; return parseCollection(subcompile); }
public Object parseCollection(char[] property, boolean subcompile, Class colType, ParserContext pCtx) { if (colType != null) this.colType = getBaseComponentType(colType); this.cursor = 0; this.pCtx = pCtx; if ((this.length = (this.property = property).length) > 0) while (length > 0 && isWhitespace(property[length - 1])) length--; return parseCollection(subcompile); }