Package com.director.core.annotation

Examples of com.director.core.annotation.DirectResult


         resultToParse = new ResultWithStrategy(directMethod.getReturnDataStrategy(), result);
      }
*/
      try {
         if(directMethod.hasResultAnnotation()) {
            DirectResult directResult = directMethod.getResultAnnotation();
            for(Pattern pattern : directResult.includes()) {
               gsonBuilder.registerTypeAdapter(pattern.type(), new IncludeFieldsTypeAdapter(pattern.fields()));
            }
            for(Pattern pattern : directResult.excludes()) {
               gsonBuilder.registerTypeAdapter(pattern.type(), new ExcludeFieldsTypeAdapter(pattern.fields()));
            }
            for(Serializer serializer : directResult.serializers()) {
               if(serializer.hierarchy()) {
                  gsonBuilder.registerTypeHierarchyAdapter(serializer.type(), serializer.impl().newInstance());
               } else {
                  gsonBuilder.registerTypeAdapter(serializer.type(), serializer.impl().newInstance());
               }
View Full Code Here

TOP

Related Classes of com.director.core.annotation.DirectResult

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.