public static Class findClass(VariableResolverFactory factory, String name, ParserContext pCtx) throws ClassNotFoundException { try { if (LITERALS.containsKey(name)) { return (Class) LITERALS.get(name); } else if (factory != null && factory.isResolveable(name)) { return (Class) factory.getVariableResolver(name).getValue(); } else if (pCtx != null && pCtx.hasImport(name)) { return pCtx.getImport(name); } else { return createClass(name, pCtx); } } catch (ClassNotFoundException e) { throw e; } catch (Exception e) { throw new RuntimeException("class not found: " + name, e); } }
public static Class findClass(VariableResolverFactory factory, String name, ParserContext pCtx) throws ClassNotFoundException { try { if (LITERALS.containsKey(name)) { return (Class) LITERALS.get(name); } else if (factory != null && factory.isResolveable(name)) { return (Class) factory.getVariableResolver(name).getValue(); } else if (pCtx != null && pCtx.hasImport(name)) { return pCtx.getImport(name); } else { return createClass(name, pCtx); } } catch (ClassNotFoundException e) { throw e; } catch (Exception e) { throw new RuntimeException("class not found: " + name, e); } }
public static Class findClass(VariableResolverFactory factory, String name, ParserContext ctx) throws ClassNotFoundException { try { if (LITERALS.containsKey(name)) { return (Class) LITERALS.get(name); } else if (factory != null && factory.isResolveable(name)) { return (Class) factory.getVariableResolver(name).getValue(); } else if (ctx != null && ctx.hasImport(name)) { return ctx.getImport(name); } else { return createClass(name, ctx); } } catch (ClassNotFoundException e) { throw e; } catch (Exception e) { throw new CompileException("class not found: " + name, e); } }
protected Class getImport(String name) { if (pCtx == null) pCtx = getParserContext(); if (pCtx.hasImport(name)) return pCtx.getImport(name); return (Class) findClassImportResolverFactory(variableFactory).getVariableResolver(name).getValue(); } }
if (gpt[i] instanceof ParameterizedType) { pt = (ParameterizedType) gpt[i]; if ((z = pCtx.getImport(subtokens[i])) != null) {
return lastNode = new LiteralDeepPropertyNode(subset(_subset, offset + 1, _subset.length - offset - 1), fields, pCtx.getImport(iStr));
public static Class getClassReference(ParserContext ctx, TypeDescriptor tDescr) throws ClassNotFoundException { Class cls; if (ctx != null && ctx.hasImport(tDescr.className)) { cls = ctx.getImport(tDescr.className); if (tDescr.isArray()) { cls = cls.isPrimitive() ? toPrimitiveArrayType(cls) : findClass(null, repeatChar('[', tDescr.arraySize.length) + "L" + cls.getName() + ";", ctx); } } else if (ctx == null && hasContextFreeImport(tDescr.className)) { cls = getContextFreeImport(tDescr.className); if (tDescr.isArray()) { cls = cls.isPrimitive() ? toPrimitiveArrayType(cls) : findClass(null, repeatChar('[', tDescr.arraySize.length) + "L" + cls.getName() + ";", ctx); } } else { cls = createClass(tDescr.getClassName(), ctx); if (tDescr.isArray()) { cls = cls.isPrimitive() ? toPrimitiveArrayType(cls) : findClass(null, repeatChar('[', tDescr.arraySize.length) + "L" + cls.getName() + ";", ctx); } } return cls; }
public static Class getClassReference(ParserContext ctx, TypeDescriptor tDescr) throws ClassNotFoundException { Class cls; if (ctx != null && ctx.hasImport(tDescr.className)) { cls = ctx.getImport(tDescr.className); if (tDescr.isArray()) { cls = cls.isPrimitive() ? toPrimitiveArrayType(cls) : findClass(null, repeatChar('[', tDescr.arraySize.length) + "L" + cls.getName() + ";", ctx); } } else if (ctx == null && hasContextFreeImport(tDescr.className)) { cls = getContextFreeImport(tDescr.className); if (tDescr.isArray()) { cls = cls.isPrimitive() ? toPrimitiveArrayType(cls) : findClass(null, repeatChar('[', tDescr.arraySize.length) + "L" + cls.getName() + ";", ctx); } } else { cls = createClass(tDescr.getClassName(), ctx); if (tDescr.isArray()) { cls = cls.isPrimitive() ? toPrimitiveArrayType(cls) : findClass(null, repeatChar('[', tDescr.arraySize.length) + "L" + cls.getName() + ";", ctx); } } return cls; }
lastWasIdentifier = true; return lastNode = new LiteralDeepPropertyNode(expr, find + 1, end - find - 1, fields, pCtx.getImport(iStr), pCtx);
public static Class getClassReference(ParserContext ctx, TypeDescriptor tDescr) throws ClassNotFoundException { Class cls; if (ctx != null && ctx.hasImport(tDescr.className)) { cls = ctx.getImport(tDescr.className); if (tDescr.isArray()) { cls = findClass(null, repeatChar('[', tDescr.arraySize.length) + "L" + cls.getName() + ";", ctx); } } else if (ctx == null && hasContextFreeImport(tDescr.className)) { cls = getContextFreeImport(tDescr.className); if (tDescr.isArray()) { cls = findClass(null, repeatChar('[', tDescr.arraySize.length) + "L" + cls.getName() + ";", ctx); } } else { cls = createClass(tDescr.getClassName(), ctx); if (tDescr.isArray()) { cls = findClass(null, repeatChar('[', tDescr.arraySize.length) + "L" + cls.getName() + ";", ctx); } } return cls; }
lastWasIdentifier = true; return lastNode = new LiteralDeepPropertyNode(expr, find + 1, end - find - 1, fields, pCtx.getImport(iStr), pCtx);
ctx = getSubComponentType(pCtx.getImport(property));
ctx = getSubComponentType(pCtx.getImport(property));
ctx = getSubComponentType(pCtx.getImport(property));
if (pCtx != null && pCtx.hasImport(typeDescr.getClassName())) { pCtx.setAllowBootstrapBypass(false); egressType = pCtx.getImport(typeDescr.getClassName());
if (pCtx != null && pCtx.hasImport(typeDescr.getClassName())) { pCtx.setAllowBootstrapBypass(false); egressType = pCtx.getImport(typeDescr.getClassName());
if (pCtx != null && pCtx.hasImport(typeDescr.getClassName())) { pCtx.setAllowBootstrapBypass(false); egressType = pCtx.getImport(typeDescr.getClassName());