b.append( ";" ); final Type type = selectedFunction.getParameterType( i ); b.append( TypeUtil.getParameterType( type, getLocale() ) );
private TypeValuePair get( final int pos ) throws EvaluationException { final LValue parameter = function.parameters[ pos ]; final Type paramType = function.metaData.getParameterType( pos ); if ( parameter != null ) { final TypeValuePair result = parameter.evaluate(); if ( result.getValue() == null ) { return result; } // lets do some type checking, right? final TypeRegistry typeRegistry = function.getContext().getTypeRegistry(); final TypeValuePair converted = typeRegistry.convertTo( paramType, result ); if ( converted == null ) { if ( logger.isDebugEnabled() ) { logger.debug( "Failed to evaluate parameter " + pos + " on function " + function ); } throw EvaluationException.getInstance( LibFormulaErrorValue.ERROR_INVALID_AUTO_ARGUMENT_VALUE ); } return converted; } else { return new TypeValuePair( paramType, function.metaData.getDefaultValue( pos ) ); } }
private TypeValuePair get(final int pos) throws EvaluationException { final LValue parameter = function.parameters[pos]; final Type paramType = function.metaData.getParameterType(pos); if (parameter != null) { final TypeValuePair result = parameter.evaluate(); if (result.getValue() == null) { return result; } // lets do some type checking, right? final TypeRegistry typeRegistry = function.getContext().getTypeRegistry(); final TypeValuePair converted = typeRegistry.convertTo(paramType, result); if (converted == null) { if (logger.isDebugEnabled()) { logger.debug("Failed to evaluate parameter " + pos + " on function " + function); } throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_AUTO_ARGUMENT_VALUE); } return converted; } else { return new TypeValuePair(paramType, function.metaData.getDefaultValue(pos)); } }
final int count = data.getParameterCount(); for ( int x = 0; x < count; x++ ) { assertNotNull( data.getParameterType( x ) ); assertNotNull( data.getParameterDescription( x, Locale.ENGLISH ) ); assertNotNull( data.getParameterDisplayName( x, Locale.ENGLISH ) );