public static Class getReturnType(Class clazz, String property, ParserContext ctx) { return new PropertyVerifier(property, ctx, clazz).analyze(); }
switch (nextSubToken()) { case NORM: ctx = getBeanProperty(ctx, capture()); break; case METH: ctx = getMethod(ctx, capture()); break; case COL: ctx = getCollectionProperty(ctx, capture()); break; case WITH: ctx = getWithProperty(ctx); break;
PropertyVerifier propVerifier = new PropertyVerifier(expr, tk.getStart(), tk.getOffset(), pCtx); propVerifier.setCtx(((Union) tk).getLeftEgressType()); tk.setEgressType(returnType = propVerifier.analyze()); tk.setEgressType(returnType = propVerifier.analyze()); if (propVerifier.isFqcn()) { tk.setAsFQCNReference(); if (propVerifier.isClassLiteral()) { return new LiteralNode(returnType, pCtx); if (propVerifier.isInput()) { pCtx.addInput(tk.getAbsoluteName(), propVerifier.isDeepProperty() ? Object.class : returnType); if (!propVerifier.isMethodCall() && !returnType.isEnum() && !pCtx.isOptimizerNotified() && pCtx.isStrongTyping() && !pCtx.isVariableVisible(tk.getAbsoluteName()) && !tk.isFQCN()) { throw new CompileException("no such identifier: " + tk.getAbsoluteName(), expr, tk.getStart()); PropertyVerifier propVerifier = new PropertyVerifier(a.getAssignmentVar(), pCtx); tk.setEgressType(returnType = propVerifier.analyze( )); if (!a.isNewDeclaration() && propVerifier.isResolvedExternally()) { pCtx.addInput(tk.getAbsoluteName(), returnType);
if (Map.class.isAssignableFrom(property.length() != 0 ? ctx = getBeanProperty(ctx, property) : ctx)) { ctx = type2Class(pCtx.getLastTypeParameters() != null && pCtx.getLastTypeParameters().length != 0 ? pCtx.getLastTypeParameters()[1] : Object.class); ctx = pCtx.getLastTypeParameters() == null || pCtx.getLastTypeParameters().length == 0 ? Object.class : type2Class(pCtx.getLastTypeParameters()[0]); skipWhitespace(); if (scanTo(']')) { addFatalError("unterminated [ in token");
PropertyVerifier propVerifier = new PropertyVerifier(tk.getNameAsArray(), pCtx); propVerifier.setCtx(((Union) tk).getLeftEgressType()); tk.setEgressType(returnType = propVerifier.analyze()); tk.setEgressType(returnType = propVerifier.analyze()); if (propVerifier.isClassLiteral()) { return new LiteralNode(returnType); if (propVerifier.isResolvedExternally()) { pCtx.addInput(tk.getAbsoluteName(), propVerifier.isDeepProperty() ? Object.class : returnType); PropertyVerifier propVerifier = new PropertyVerifier(a.getAssignmentVar(), pCtx); tk.setEgressType(returnType = propVerifier.analyze()); if (!a.isNewDeclaration() && propVerifier.isResolvedExternally()) { pCtx.addInput(tk.getAbsoluteName(), returnType);
if (pCtx.hasVarOrInput(property)) { if (pCtx.isStrictTypeEnforcement()) { recordTypeParmsForProperty(property); recordTypeParmsForProperty("this"); Type[] classArgs = type2Class(pt.getRawType()).getTypeParameters(); return getReturnType(ctx, (Method) member); Object tryStaticMethodRef = tryStaticAccess(); Class cls = getMethod(ctx, property); if (cls != Object.class) { return cls;
recordTypeParmsForProperty("this"); for (int i = 0; i < typeVariables.length; i++) { Type typeArg = pCtx.getLastTypeParameters()[i]; typeArgs.put(typeVariables[i].getName(), typeArg instanceof Class ? type2Class( pCtx.getLastTypeParameters()[i] ) : Object.class); return type2Class(paramTypes.get(returnTypeArg)); if (scope.trim().equals("")) scope = "<package local>"; addFatalError("the referenced method is not accessible: " + ctx.getName() + "." + name + "(" + errorBuild.toString() + ")" + " (scope: " + scope + "; required: public", this.tkStart); return getReturnType(ctx, m);
if (pCtx.hasVarOrInput(property)) { if (pCtx.isStrictTypeEnforcement()) { recordTypeParmsForProperty(property); recordTypeParmsForProperty("this"); Object tryStaticMethodRef = tryStaticAccess(); addFatalError("unqualified type in strict mode for: " + property);
addFatalError("unable to resolve method using strict-mode: " + ctx.getName() + "." + name + "(" + errorBuild.toString() + ")");
PropertyVerifier propVerifier = new PropertyVerifier(expr, tk.getStart(), tk.getOffset(), pCtx); propVerifier.setCtx(((Union) tk).getLeftEgressType()); tk.setEgressType(returnType = propVerifier.analyze()); tk.setEgressType(returnType = propVerifier.analyze()); if (propVerifier.isFqcn()) { tk.setAsFQCNReference(); if (propVerifier.isClassLiteral()) { return new LiteralNode(returnType, pCtx); if (propVerifier.isInput()) { pCtx.addInput(tk.getAbsoluteName(), propVerifier.isDeepProperty() ? Object.class : returnType); if (!propVerifier.isMethodCall() && !returnType.isEnum() && !pCtx.isOptimizerNotified() && pCtx.isStrongTyping() && !pCtx.isVariableVisible(tk.getAbsoluteName()) && !tk.isFQCN()) { throw new CompileException("no such identifier: " + tk.getAbsoluteName(), expr, tk.getStart()); PropertyVerifier propVerifier = new PropertyVerifier(a.getAssignmentVar(), pCtx); tk.setEgressType(returnType = propVerifier.analyze( )); if (!a.isNewDeclaration() && propVerifier.isResolvedExternally()) { pCtx.addInput(tk.getAbsoluteName(), returnType);
if (Map.class.isAssignableFrom(property.length() != 0 ? ctx = getBeanProperty(ctx, property) : ctx)) { ctx = type2Class(pCtx.getLastTypeParameters() != null && pCtx.getLastTypeParameters().length != 0 ? pCtx.getLastTypeParameters()[1] : Object.class); ctx = pCtx.getLastTypeParameters() == null || pCtx.getLastTypeParameters().length == 0 ? Object.class : type2Class(pCtx.getLastTypeParameters()[0]); skipWhitespace(); if (scanTo(']')) { addFatalError("unterminated [ in token");
if (pCtx.hasVarOrInput(property)) { if (pCtx.isStrictTypeEnforcement()) { recordTypeParmsForProperty(property); recordTypeParmsForProperty("this"); Type[] classArgs = type2Class(pt.getRawType()).getTypeParameters(); return getReturnType(ctx, (Method) member); Object tryStaticMethodRef = tryStaticAccess(); Class cls = getMethod(ctx, property); if (cls != Object.class) { return cls;
recordTypeParmsForProperty("this"); for (int i = 0; i < typeVariables.length; i++) { Type typeArg = pCtx.getLastTypeParameters()[i]; typeArgs.put(typeVariables[i].getName(), typeArg instanceof Class ? type2Class( pCtx.getLastTypeParameters()[i] ) : Object.class); return type2Class(paramTypes.get(returnTypeArg)); if (scope.trim().equals("")) scope = "<package local>"; addFatalError("the referenced method is not accessible: " + ctx.getName() + "." + name + "(" + errorBuild.toString() + ")" + " (scope: " + scope + "; required: public", this.tkStart); return getReturnType(ctx, m);
switch (nextSubToken()) { case NORM: ctx = getBeanProperty(ctx, capture()); break; case METH: ctx = getMethod(ctx, capture()); break; case COL: ctx = getCollectionProperty(ctx, capture()); break; case WITH: ctx = getWithProperty(ctx); break;
if (Map.class.isAssignableFrom(property.length() != 0 ? ctx = getBeanProperty(ctx, property) : ctx)) { ctx = (Class) pCtx.getLastTypeParameters()[1]; skipWhitespace(); throw new PropertyAccessException("unterminated '['"); if (scanTo(']')) { addFatalError("unterminated [ in token");
public static Class getReturnType(Class clazz, String property, ParserContext ctx) { return new PropertyVerifier(property, ctx, clazz).analyze(); }
switch (nextSubToken()) { case NORM: ctx = getBeanProperty(ctx, capture()); break; case METH: ctx = getMethod(ctx, capture()); break; case COL: ctx = getCollectionProperty(ctx, capture()); break; case WITH: ctx = getWithProperty(ctx); break;
public static Class getReturnType(Class clazz, String property, ParserContext ctx) { return new PropertyVerifier(property, ctx, clazz).analyze(); }
PropertyVerifier verifier = new PropertyVerifier(property, this.pCtx = pCtx); ((Map) ctx).put(eval(ex, ctx, variableFactory), convert(value, returnType = verifier.analyze())); convert(value, returnType = verifier.analyze()));
PropertyVerifier verifier = new PropertyVerifier(property, this.pCtx = pCtx); ((Map) ctx).put(eval(ex, ctx, variableFactory), convert(value, returnType = verifier.analyze())); convert(value, returnType = verifier.analyze()));