/** * Indicates whether a {@link Decorator} is passivation capable or not. * @return */ public static boolean isPassivationCapable(Decorator<?> decorator) { if (decorator instanceof CustomDecoratorWrapper<?>) { // unwrap decorator = Reflections.<CustomDecoratorWrapper<?>>cast(decorator).delegate(); } if (decorator instanceof DecoratorImpl<?>) { DecoratorImpl<?> weldDecorator = (DecoratorImpl<?>) decorator; return weldDecorator.getEnhancedAnnotated().isSerializable(); } return decorator instanceof PassivationCapable; } }
/** * Indicates whether a {@link Decorator} is passivation capable or not. * @return */ public static boolean isPassivationCapable(Decorator<?> decorator) { if (decorator instanceof CustomDecoratorWrapper<?>) { // unwrap decorator = Reflections.<CustomDecoratorWrapper<?>>cast(decorator).delegate(); } if (decorator instanceof DecoratorImpl<?>) { DecoratorImpl<?> weldDecorator = (DecoratorImpl<?>) decorator; return weldDecorator.getEnhancedAnnotated().isSerializable(); } return decorator instanceof PassivationCapable; } }
/** * Indicates whether a {@link Decorator} is passivation capable or not. * @return */ public static boolean isPassivationCapable(Decorator<?> decorator) { if (decorator instanceof CustomDecoratorWrapper<?>) { // unwrap decorator = Reflections.<CustomDecoratorWrapper<?>>cast(decorator).delegate(); } if (decorator instanceof DecoratorImpl<?>) { DecoratorImpl<?> weldDecorator = (DecoratorImpl<?>) decorator; return weldDecorator.getEnhancedAnnotated().isSerializable(); } return decorator instanceof PassivationCapable; } }
/** * Indicates whether a {@link Decorator} is passivation capable or not. * @return */ public static boolean isPassivationCapable(Decorator<?> decorator) { if (decorator instanceof CustomDecoratorWrapper<?>) { // unwrap decorator = Reflections.<CustomDecoratorWrapper<?>>cast(decorator).delegate(); } if (decorator instanceof DecoratorImpl<?>) { DecoratorImpl<?> weldDecorator = (DecoratorImpl<?>) decorator; return weldDecorator.getEnhancedAnnotated().isSerializable(); } return decorator instanceof PassivationCapable; } }
/** * Indicates whether a {@link Decorator} is passivation capable or not. * @return */ public static boolean isPassivationCapable(Decorator<?> decorator) { if (decorator instanceof CustomDecoratorWrapper<?>) { // unwrap decorator = Reflections.<CustomDecoratorWrapper<?>>cast(decorator).delegate(); } if (decorator instanceof DecoratorImpl<?>) { DecoratorImpl<?> weldDecorator = (DecoratorImpl<?>) decorator; return weldDecorator.getEnhancedAnnotated().isSerializable(); } return decorator instanceof PassivationCapable; } }
/** * Indicates whether a {@link Decorator} is passivation capable or not. * @return */ public static boolean isPassivationCapable(Decorator<?> decorator) { if (decorator instanceof CustomDecoratorWrapper<?>) { // unwrap decorator = Reflections.<CustomDecoratorWrapper<?>>cast(decorator).delegate(); } if (decorator instanceof DecoratorImpl<?>) { DecoratorImpl<?> weldDecorator = (DecoratorImpl<?>) decorator; return weldDecorator.getEnhancedAnnotated().isSerializable(); } return decorator instanceof PassivationCapable; } }