public T build(Object... attributes) {
        List<Object> attributeList = new ArrayList<Object>(Arrays.asList(attributes)); //kinda wacky but Arrays.asList returns a unmodifiable list

        String[] traitNames = getTraitNames(attributeList);
        applyTraits(traitNames);

        T object = ReflectionUtils.createObject(factoryClass, constructorArgs);

        // merge default properties with supplied attributes
        Map<String, Object> propertyValues = createObjectPropertyValues(this.propertyValues, attributeList);

        // now set properties and fields to the created object
        setProperties(object, propertyValues);
        setFields(object, fieldValues);

        executeCallbacks(AfterFactoryBuild.class, object);
        return object;
    }
public T build(Object... attributes) {
        List<Object> attributeList = new ArrayList<Object>(Arrays.asList(attributes)); 

        String[] traitNames = getTraitNames(attributeList);
        applyTraits(traitNames);

        T object = ReflectionUtils.createObject(factoryClass, constructorArgs);

        
        Map<String, Object> propertyValues = createObjectPropertyValues(this.propertyValues, attributeList);

        
        setProperties(object, propertyValues);
        setFields(object, fieldValues);

        executeCallbacks(AfterFactoryBuild.class, object);
        return object;
    }
public T build ( Object ... attributes ) { List < Object > attributeList = new ArrayList < Object > ( Arrays . asList ( attributes ) ) ; //kinda wacky but Arrays.asList returns a unmodifiable list String [ ] traitNames = getTraitNames ( attributeList ) ; applyTraits ( traitNames ) ; T object = ReflectionUtils . createObject ( factoryClass , constructorArgs ) ; // merge default properties with supplied attributes Map < String , Object > propertyValues = createObjectPropertyValues ( this . propertyValues , attributeList ) ; // now set properties and fields to the created object setProperties ( object , propertyValues ) ; setFields ( object , fieldValues ) ; executeCallbacks ( AfterFactoryBuild . class , object ) ; return object ; }
Build object.
@return
Build object .