MCPcopy Create free account
hub / github.com/PCGen/pcgen / getBean

Method getBean

code/src/java/pcgen/cdom/helper/SpringHelper.java:61–70  ·  view source on GitHub ↗

Retrieve a Spring bean based on the class that it implements. Where multiple beans implement a class, the first will be returned. @param cl The type of bean to be retrieved. @return The bean, or null if none exists.

(Class<T> cl)

Source from the content-addressed store, hash-verified

59 * @return The bean, or null if none exists.
60 */
61 @Nullable
62 public static <T> T getBean(Class<T> cl)
63 {
64 String[] beanNamesForType = BEAN_FACTORY.getBeanNamesForType(cl);
65 if (beanNamesForType.length == 0)
66 {
67 return null;
68 }
69 return BEAN_FACTORY.getBean(beanNamesForType[0], cl);
70 }
71
72 public static Collection<AbstractStorageFacet> getStorageBeans()
73 {

Callers 4

DynamicScopeClass · 0.95
loadLegalScopeLibraryMethod · 0.95
getFacetMethod · 0.95
processMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected