public boolean isVariableVisible(String var) { if (variableVisibility == null || variableVisibility.isEmpty()) { return false; } if (AbstractParser.LITERALS.containsKey(var) || hasImport(var)) { return true; } int pos = variableVisibility.size() - 1; do { if (variableVisibility.get(pos).contains(var)) { return true; } } while (pos-- != 0); return false; }
public boolean isVariableVisible(String var) { if (variableVisibility == null || variableVisibility.isEmpty()) { return false; } if (AbstractParser.LITERALS.containsKey(var) || hasImport(var)) { return true; } int pos = variableVisibility.size() - 1; do { if (variableVisibility.get(pos).contains(var)) { return true; } } while (pos-- != 0); return false; }
if (pCtx.hasImport(iStr)) { lastWasIdentifier = true; return lastNode = new LiteralDeepPropertyNode(expr, find + 1, end - find - 1, fields, if (pCtx.hasImport(tmp = new String(expr, st, cursor - st))) { lastWasIdentifier = true; return lastNode = new LiteralNode(pCtx.getStaticOrClassImport(tmp), pCtx); if (pCtx.hasImport(new String(expr, st, cursor - st - 2))) { lastWasIdentifier = true; TypeDescriptor typeDescriptor = new TypeDescriptor(expr, st, cursor - st, fields);
protected boolean hasImport(String name) { if (pCtx == null) pCtx = getParserContext(); if (pCtx.hasImport(name)) { return true; } else { VariableResolverFactory vrf = findClassImportResolverFactory(variableFactory); return vrf != null && vrf.isResolveable(name); } }
if (pCtx.hasImport(iStr)) { lastWasIdentifier = true; return lastNode = new LiteralDeepPropertyNode(expr, find + 1, end - find - 1, fields, if (pCtx.hasImport(tmp = new String(expr, st, cursor - st))) { lastWasIdentifier = true; return lastNode = new LiteralNode(pCtx.getStaticOrClassImport(tmp), pCtx); if (pCtx.hasImport(new String(expr, st, cursor - st - 2))) { lastWasIdentifier = true; TypeDescriptor typeDescriptor = new TypeDescriptor(expr, st, cursor - st, fields);
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(); } }
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; }
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; }
ctx = getSubComponentType(pCtx.getVarOrInputType(property)); else if (pCtx.hasImport(property)) { resolvedExternally = false; ctx = getSubComponentType(pCtx.getImport(property));
ctx = getSubComponentType(pCtx.getVarOrInputType(property)); else if (pCtx.hasImport(property)) { resolvedExternally = false; ctx = getSubComponentType(pCtx.getImport(property));
ctx = getSubComponentType(pCtx.getVarOrInputType(property)); else if (pCtx.hasImport(property)) { resolvedExternally = false; 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());