Class EndpointReflection
java.lang.Object
edu.suffolk.litlab.efspserver.services.EndpointReflection
Most of this class taken from the below blog post: https://dalelane.co.uk/blog/?p=1871
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionendPointsToMap
(Collection<EndpointReflection.Endpoint> endpoints) findRESTEndpoints
(List<Class> classes) Returns REST endpoints defined in Java classes in the specified package.getClassPaths
(List<Class> classes) makeRestEndpoints
(List<Method> methods, Class<?> clazz) pathParamsToMap
(Stream<String> params) replacePathParam
(Collection<EndpointReflection.Endpoint> endpoints, Map<String, String> paramVals)
-
Constructor Details
-
EndpointReflection
-
-
Method Details
-
findRESTEndpoints
Returns REST endpoints defined in Java classes in the specified package. -
makeRestEndpoints
-
getClassPaths
-
replacePathParam
public static Collection<EndpointReflection.Endpoint> replacePathParam(Collection<EndpointReflection.Endpoint> endpoints, Map<String, String> paramVals) -
endPointsToMap
public Map<String,Map<String, endPointsToMapString>> (Collection<EndpointReflection.Endpoint> endpoints) -
pathParamsToMap
-