private Object convertObjectToSingleValue ( Object rawValue , ExtendedAttributeDefinition attrDef , EvaluationContext context , int index , boolean ignoreWarnings ) throws ConfigEvaluatorException { if ( rawValue instanceof String ) { return convertStringToSingleValue ( ( String ) rawValue , attrDef , context , ignoreWarnings ) ; } else if ( rawValue instanceof ConfigElement . Reference ) { ConfigElement . Reference reference = processReference ( ( ConfigElement . Reference ) rawValue , context , ignoreWarnings ) ; if ( attrDef != null && attrDef . getType ( ) == MetaTypeFactory . PID_TYPE ) { return evaluateReference ( reference . getId ( ) , attrDef , context ) ; } else { return evaluateReference ( reference , context ) ; } } else if ( rawValue instanceof ConfigElement ) { return convertConfigElementToSingleValue ( ( ConfigElement ) rawValue , attrDef , context , index , ignoreWarnings ) ; } else { throw new IllegalStateException ( "Unsupported type: " + rawValue . getClass ( ) ) ; } }
Process and evaluate a raw value .