@Override public Object getInstance() { return value.getValue(); } }
/** * Constructs a new mapped value service. * @param mapper a function that maps the supplied value to the service value * @param supplier produces the supplied value */ public MappedValueService(Function<T, V> mapper, Value<T> supplier) { super(mapper, context -> supplier.getValue(), (context, value) -> {}); } }
@Override public String getInstanceClassName() { final Object instance = value != null ? value.getValue() : null; if(instance == null) { return ContextListManagedReferenceFactory.DEFAULT_INSTANCE_CLASS_NAME; } return instance.getClass().getName(); }
@Override public T getValue() { Value<T> value = getStoredValue(); if (value == null) { throw new IllegalStateException(); } return value.getValue(); }
@Override public ManagedReference getReference() { return new ValueManagedReference(value.getValue()); }
public Interceptor create(final InterceptorFactoryContext context) { return new ManagedReferenceFieldInjectionInterceptor(targetContextKey, valueContextKey, factoryValue.getValue(), field, optional); }
public Interceptor create(final InterceptorFactoryContext context) { return new ManagedReferenceMethodInjectionInterceptor(targetContextKey, valueContextKey, factoryValue.getValue(), method, optional); }
@Override public Object dispatch() throws Throwable { return method.invoke(getTarget().getValue(), toObjects(method.getGenericParameterTypes())); } }
@Override public Object dispatch() throws Throwable { return getField().get(getTarget().getValue()); } }
@Override public String getJndiViewInstanceValue() { final Object instance = value != null ? value.getValue() : null; if (instance == null) { return "null"; } final ClassLoader cl = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged(); try { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(instance.getClass().getClassLoader()); return instance.toString(); } finally { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(cl); } }
@Override public Object dispatch() throws Throwable { Object[] params = toObjects(new Type[]{getField().getGenericType()}); if (params == null || params.length != 1) throw PojoLogger.ROOT_LOGGER.illegalParameterLength(Arrays.toString(params)); getField().set(getTarget().getValue(), params[0]); return null; } }
@Override public Object dispatch() throws Throwable { String[] pts = types; if (pts == null) pts = Configurator.getTypes(getParameters()); Object target = getTarget().getValue(); Method method = beanInfo.findMethod(methodName, pts); return method.invoke(target, toObjects(method.getGenericParameterTypes())); } }
viewClass = Class.forName(this.viewClass, false, WildFlySecurityManager.getCurrentContextClassLoaderPrivileged()); } catch (ClassNotFoundException e) { if(viewClassLoader == null || viewClassLoader.getValue() == null) { throw EjbLogger.ROOT_LOGGER.failToLoadViewClassEjb(identifier.toString(), e); viewClass = Class.forName(this.viewClass, false, viewClassLoader.getValue()); } catch (ClassNotFoundException ce) { throw EjbLogger.ROOT_LOGGER.failToLoadViewClassEjb(identifier.toString(), ce);
/** * Constructs a new mapped value service. * @param mapper a function that maps the supplied value to the service value * @param supplier produces the supplied value */ public MappedValueService(Function<T, V> mapper, Value<T> supplier) { super(mapper, context -> supplier.getValue(), (context, value) -> {}); } }
@Override public Object getInstance() { return value.getValue(); } }
@Override public Object getInstance() { return value.getValue(); } }
@Override public DeploymentChain getValue() throws IllegalStateException { return deploymentChainValue.getValue(); } }
@Override public T getValue() throws IllegalStateException { return deploymentProcessorValue.getValue(); } }