List of usage examples for org.apache.wicket.util.collections ClassMetaCache get
public T get(final Class<?> key)
From source file:com.github.javawithmarcus.wicket.cdi.NonContextual.java
License:Apache License
/** * Factory method for creating noncontextual instances * //w ww .j a v a2 s . c om * @param <T> Bean type. * @param clazz Bean class. * @return {@link NonContextual} instance. */ public static <T> NonContextual<T> of(Class<? extends T> clazz) { ClassMetaCache<NonContextual<?>> meta = getCache(); @SuppressWarnings("unchecked") NonContextual<T> nc = (NonContextual<T>) meta.get(clazz); if (nc == null) { nc = new NonContextual<>(clazz); meta.put(clazz, nc); } return nc; }