@Override public void clear() { for (final String id : getContextualIds()) { Contextual<?> contextual = get(id).getContextual(); if (contextual instanceof SerializableContextual<?, ?>) { contextual = ((SerializableContextual<?, ?>) contextual).get(); } if (contextual instanceof ExtensionBean) { continue; } delegate().remove(id); } } }
/** * @param self the proxy instance. * @param method the overridden method declared in the super class or * interface. * @param proceed the forwarder method for invoking the overridden method. It * is null if the overridden method is abstract or declared in the * interface. * @param args an array of objects containing the values of the arguments * passed in the method invocation on the proxy instance. If a * parameter type is a primitive type, the type of the array * element is a wrapper class. * @return the resulting value of the method invocation. * @throws Throwable if the method invocation fails. */ @Override protected Object doInvoke(Object self, Method method, Method proceed, Object[] args) throws Throwable { Decorator<Object> decorator = decoratorInstance.getContextual().get(); if (decorator instanceof WeldDecorator<?>) { WeldDecorator<?> weldDecorator = (WeldDecorator<?>) decorator; return doInvoke(weldDecorator, decoratorInstance.getInstance(), method, args); } else { throw BeanLogger.LOG.unexpectedUnwrappedCustomDecorator(decorator); } }
/** * @param self the proxy instance. * @param method the overridden method declared in the super class or * interface. * @param proceed the forwarder method for invoking the overridden method. It * is null if the overridden method is abstract or declared in the * interface. * @param args an array of objects containing the values of the arguments * passed in the method invocation on the proxy instance. If a * parameter type is a primitive type, the type of the array * element is a wrapper class. * @return the resulting value of the method invocation. * @throws Throwable if the method invocation fails. */ @Override protected Object doInvoke(Object self, Method method, Method proceed, Object[] args) throws Throwable { Decorator<Object> decorator = decoratorInstance.getContextual().get(); if (decorator instanceof WeldDecorator<?>) { WeldDecorator<?> weldDecorator = (WeldDecorator<?>) decorator; return doInvoke(weldDecorator, decoratorInstance.getInstance(), method, args); } else { throw BeanLogger.LOG.unexpectedUnwrappedCustomDecorator(decorator); } }
/** * @param self the proxy instance. * @param method the overridden method declared in the super class or * interface. * @param proceed the forwarder method for invoking the overridden method. It * is null if the overridden method is abstract or declared in the * interface. * @param args an array of objects containing the values of the arguments * passed in the method invocation on the proxy instance. If a * parameter type is a primitive type, the type of the array * element is a wrapper class. * @return the resulting value of the method invocation. * @throws Throwable if the method invocation fails. */ @Override protected Object doInvoke(Object self, Method method, Method proceed, Object[] args) throws Throwable { Decorator<Object> decorator = decoratorInstance.getContextual().get(); if (decorator instanceof WeldDecorator<?>) { WeldDecorator<?> weldDecorator = (WeldDecorator<?>) decorator; return doInvoke(weldDecorator, decoratorInstance.getInstance(), method, args); } else { throw BeanLogger.LOG.unexpectedUnwrappedCustomDecorator(decorator); } }
/** * @param self the proxy instance. * @param method the overridden method declared in the super class or * interface. * @param proceed the forwarder method for invoking the overridden method. It * is null if the overridden method is abstract or declared in the * interface. * @param args an array of objects containing the values of the arguments * passed in the method invocation on the proxy instance. If a * parameter type is a primitive type, the type of the array * element is a wrapper class. * @return the resulting value of the method invocation. * @throws Throwable if the method invocation fails. */ @Override protected Object doInvoke(Object self, Method method, Method proceed, Object[] args) throws Throwable { Decorator<Object> decorator = decoratorInstance.getContextual().get(); if (decorator instanceof WeldDecorator<?>) { WeldDecorator<?> weldDecorator = (WeldDecorator<?>) decorator; return doInvoke(weldDecorator, decoratorInstance.getInstance(), method, args); } else { throw BeanLogger.LOG.unexpectedUnwrappedCustomDecorator(decorator); } }
/** * @param self the proxy instance. * @param method the overridden method declared in the super class or * interface. * @param proceed the forwarder method for invoking the overridden method. It * is null if the overridden method is abstract or declared in the * interface. * @param args an array of objects containing the values of the arguments * passed in the method invocation on the proxy instance. If a * parameter type is a primitive type, the type of the array * element is a wrapper class. * @return the resulting value of the method invocation. * @throws Throwable if the method invocation fails. */ @Override protected Object doInvoke(Object self, Method method, Method proceed, Object[] args) throws Throwable { Decorator<Object> decorator = decoratorInstance.getContextual().get(); if (decorator instanceof WeldDecorator<?>) { WeldDecorator<?> weldDecorator = (WeldDecorator<?>) decorator; return doInvoke(weldDecorator, decoratorInstance.getInstance(), method, args); } else { throw BeanLogger.LOG.unexpectedUnwrappedCustomDecorator(decorator); } }
/** * @param self the proxy instance. * @param method the overridden method declared in the super class or * interface. * @param proceed the forwarder method for invoking the overridden method. It * is null if the overridden method is abstract or declared in the * interface. * @param args an array of objects containing the values of the arguments * passed in the method invocation on the proxy instance. If a * parameter type is a primitive type, the type of the array * element is a wrapper class. * @return the resulting value of the method invocation. * @throws Throwable if the method invocation fails. */ @Override protected Object doInvoke(Object self, Method method, Method proceed, Object[] args) throws Throwable { Decorator<Object> decorator = decoratorInstance.getContextual().get(); if (decorator instanceof WeldDecorator<?>) { WeldDecorator<?> weldDecorator = (WeldDecorator<?>) decorator; return doInvoke(weldDecorator, decoratorInstance.getInstance(), method, args); } else { throw BeanLogger.LOG.unexpectedUnwrappedCustomDecorator(decorator); } }