Package gov.nyc.doitt.gis.geoclient.api
Class CallBuilder
java.lang.Object
gov.nyc.doitt.gis.geoclient.api.CallBuilder
Fluent builders for assembling the argument map used to call a Geosupport
Function. Each builder starts with the function's required arguments.- Author:
- mlipper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for address calls.protected static classBase class for call builders. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends CallBuilder.Builder>
TnewInstance(Function function, Class<T> callType) Creates a builder of the given type by calling its constructor that takes aFunction.
-
Constructor Details
-
CallBuilder
public CallBuilder()Creates a new instance.
-
-
Method Details
-
newInstance
public static <T extends CallBuilder.Builder> T newInstance(Function function, Class<T> callType) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, IllegalArgumentException, InstantiationException Creates a builder of the given type by calling its constructor that takes aFunction.- Type Parameters:
T- the builder type- Parameters:
function- the Geosupport function to be calledcallType- the builder class to instantiate- Returns:
- a new builder
- Throws:
NoSuchMethodException- if the class has no public constructor taking aFunctionInvocationTargetException- if the constructor throws an exceptionIllegalAccessException- if the constructor is not accessibleIllegalArgumentException- if the constructor arguments are invalidInstantiationException- if the class is abstract
-