Skip to content

Commit

Permalink
chore: Make endpoint data available to copilot (#2689)
Browse files Browse the repository at this point in the history
Co-authored-by: Luciano Vernaschi <[email protected]>
Co-authored-by: Anton Platonov <[email protected]>
  • Loading branch information
3 people committed Sep 2, 2024
1 parent 4ca29e4 commit a9fcef4
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ private VaadinEndpointData(Object vaadinEndpointObject,
method));
}

/**
* Gets all the endpoint methods.
*
* @return the endpoint methods
*/
public Map<String, Method> getMethods() {
return methods;
}

/**
* Finds a method with the given name.
*
Expand Down Expand Up @@ -126,6 +135,15 @@ void registerEndpoint(Object endpointBean) {
beanType);
}

/**
* Gets all registered endpoints.
*
* @return a map of endpoint names to endpoint data
*/
public Map<String, VaadinEndpointData> getEndpoints() {
return vaadinEndpoints;
}

VaadinEndpointData get(String endpointName) {
return vaadinEndpoints.get(endpointName.toLowerCase(Locale.ENGLISH));
}
Expand Down

0 comments on commit a9fcef4

Please sign in to comment.