Package org.infinispan.commons.marshall

Examples of org.infinispan.commons.marshall.SerializeWith


   final ClassExternalizerFactory jbmarExtFactory = new AnnotationClassExternalizerFactory();

   @Override
   public Externalizer getExternalizer(Class<?> type) {
      SerializeWith ann = type.getAnnotation(SerializeWith.class);
      if (ann == null) {
         // Check for JBoss Marshaller's @Externalize
         return jbmarExtFactory.getExternalizer(type);
      } else {
         try {
            return new JBossExternalizerAdapter(ann.value().newInstance());
         } catch (Exception e) {
            throw new IllegalArgumentException(String.format(
                  "Cannot instantiate externalizer for %s", type), e);
         }
      }
View Full Code Here


   @Override
   public Externalizer getExternalizer(Class<?> type) {
      try {
         final org.infinispan.commons.marshall.Externalizer<?> ext;
         SerializeWith ann = type.getAnnotation(SerializeWith.class);
         if (ann != null) {
            ext = ann.value().newInstance();
         } else {
            org.infinispan.marshall.SerializeWith legacy = type.getAnnotation(org.infinispan.marshall.SerializeWith.class);
            if (legacy != null) {
               ext = new LegacyExternalizerAdapter(legacy.value().newInstance());
            } else {
View Full Code Here

TOP

Related Classes of org.infinispan.commons.marshall.SerializeWith

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.