private static void verifyMethodCallExpression( MethodCallExpression expr ) { if( expr.getFunctionType() != null && expr.getFunctionType().getMethodInfo() != null ) { verifyMethodInvocation( expr, expr.getFunctionType().getMethodInfo() ); } }
if( functionType.getMethodInfo() != null ) IParameterInfo info = functionType.getMethodInfo().getParameters()[i]; name = info.getName();
private void ensureAbstractMethodsImpledAndNoDiamonds( IGosuClassInternal gsClass ) { List<IFunctionType> unimpled = gsClass.getUnimplementedMethods(); for( Iterator<IFunctionType> iter = unimpled.iterator(); iter.hasNext(); ) { IFunctionType funcType = iter.next(); final IMethodInfo mi = funcType.getMethodInfo(); if( mi.isDefaultImpl() ) { // mi is a default interface method the class (or interface) does not override, // check for a duplicate, not-overridden method that comes from an interface that // is unrelated to mi's declaring interface // i.e., prohibit "diamond" patterns directly interface-inherited from the class (or interface). if( conflictsWithUnrelatedIfaceMethod( gsClass, funcType, unimpled ) ) { iter.remove(); } } else if( !gsClass.isInterface() && !gsClass.isAbstract() ) { // mi is abstract, the non-abstract class failed to implement it... String strClass = funcType.getEnclosingType().getName(); strClass = IGosuClass.ProxyUtil.getNameSansProxy( strClass ); getClassStatement().addParseException( new NotImplementedParseException( makeFullParserState(), gsClass, strClass, funcType ) ); } } }
@Override public void collect(IMethodCallExpression methodCall, DependencySink sink) { final IFunctionSymbol function = methodCall.getFunctionSymbol(); if (function != null && !isBlock(function) && !isPrintFunction(function) && !isConstructor(function)) { final IFunctionType type = methodCall.getFunctionType(); if (type != null) { final IMethodInfo info = type.getMethodInfo(); if (info != null) { final IType ownerType = info.getOwnersType(); if (ownerType instanceof IGosuEnhancement) { sink.addType(ownerType); } } } } } }
@Override public void collect(IMethodCallExpression methodCall, DependencySink sink) { final IFunctionSymbol function = methodCall.getFunctionSymbol(); if (function != null && !isBlock(function) && !isPrintFunction(function) && !isConstructor(function)) { final IFunctionType type = methodCall.getFunctionType(); if (type != null) { final IMethodInfo info = type.getMethodInfo(); if (info != null) { final IType ownerType = info.getOwnersType(); if (ownerType instanceof IGosuEnhancement) { sink.addType(ownerType); } } } } } }
if( symbol.getType() instanceof IFunctionType ) IMethodInfo mi = ((IFunctionType)symbol.getType()).getMethodInfo(); if( mi != null )
if( funcType.getMethodInfo() != null ) return new IParameterInfo[][]{funcType.getMethodInfo().getParameters()};
if( funcType.getMethodInfo() != null ) return new IParameterInfo[][]{funcType.getMethodInfo().getParameters()};
if( symbol.getType() instanceof IFunctionType ) IMethodInfo mi = ((IFunctionType)symbol.getType()).getMethodInfo(); if( mi != null )
private boolean conflictsWithUnrelatedIfaceMethod( IGosuClassInternal gsClass, IFunctionType ft, List<IFunctionType> unimpled ) IMethodInfo mi = ft.getMethodInfo(); outer: for( IFunctionType funcType: unimpled ) final IMethodInfo csrMi = funcType.getMethodInfo(); if( csrMi.getDisplayName().equals( mi.getDisplayName() ) && csrMi.getParameters().length == mi.getParameters().length &&
fle.setFeature( ((IFunctionType)funcType).getMethodInfo(), score.getArguments() );
e.setArgTypes( argTypes ); IFunctionType rawFunctionType = (IFunctionType)methodScore.getRawFunctionType(); md = rawFunctionType.getMethodInfo(); if( !md.isVisible( getVisibilityConstraint() ) ) e.setNamedArgOrder( methodScore.getNamedArgOrder() ); verifyCase( e, strMemberName, funcType.getName(), state, Res.MSG_FUNCTION_CASE_MISMATCH, false ); verifySuperAccess( rootExpression, e, funcType.getMethodInfo(), strMemberName ); e.setArgTypes( argTypes ); e.setAccessPath( strMemberName ); md = funcType.getMethodInfo(); verify( e, md.isVisible( getVisibilityConstraint() ) || getPropertyNameFromMethodName( strMemberName ) != null, Res.MSG_METHOD_NOT_VISIBLE, strMemberName ); verify( e, !md.isAbstract() || verifySuperAccess( rootExpression, e, funcType.getMethodInfo(), strMemberName ); e.setArgs( null );
e.setArgTypes( argTypes ); IFunctionType rawFunctionType = (IFunctionType)methodScore.getRawFunctionType(); md = rawFunctionType.getMethodInfo(); if( !md.isVisible( getVisibilityConstraint() ) ) e.setArgTypes( argTypes ); e.setAccessPath( strMemberName ); md = funcType.getMethodInfo(); verify( e, md.isVisible( getVisibilityConstraint() ), Res.MSG_METHOD_NOT_VISIBLE, strMemberName ); verify( e, !md.isAbstract() ||