public Object lookupSoyFunction ( String name , int numArgs , SourceLocation location ) { Object soyFunction = functions . get ( name ) ; if ( soyFunction == null ) { reportMissing ( location , "function" , name , functions . keySet ( ) ) ; return ERROR_PLACEHOLDER_FUNCTION ; } Set < Integer > validArgsSize ; if ( soyFunction instanceof SoyFunction ) { validArgsSize = ( ( SoyFunction ) soyFunction ) . getValidArgsSizes ( ) ; } else { validArgsSize = getValidArgsSizes ( soyFunction . getClass ( ) . getAnnotation ( SoyFunctionSignature . class ) . value ( ) ) ; } checkNumArgs ( "function" , validArgsSize , numArgs , location ) ; warnIfDeprecated ( name , soyFunction , location ) ; return soyFunction ; }
Returns a function with the given name and arity .