com.pastdev.httpcomponents.factory.AbstractParamValueFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server Show documentation
Show all versions of server Show documentation
A set of interfaces and factories for building servers.
The newest version!
package com.pastdev.httpcomponents.factory;
import java.util.HashMap;
import java.util.Map;
import com.pastdev.httpcomponents.annotations.FactoryParam;
import com.pastdev.httpcomponents.annotations.Param;
import com.pastdev.httpcomponents.server.Servers;
abstract public class AbstractParamValueFactory implements ParamValueFactory {
@Override
final public String valueOf( Servers servers, Param param ) {
Map factoryParams = new HashMap<>();
for ( FactoryParam factoryParam : param.factoryParams() ) {
factoryParams.put( factoryParam.name(), factoryParam.value() );
}
return valueOf( servers, factoryParams );
}
abstract public String valueOf( Servers servers, Map factoryParams );
}