Examples of ReaderException


Examples of org.codehaus.backport175.reader.ReaderException

            final ClassLoader loader = annotationClass.getClassLoader();
            final byte[] bytes;
            try {
                bytes = AnnotationReader.BYTECODE_PROVIDER.getBytecode(className, loader);
            } catch (Exception e) {
                throw new ReaderException("could not retrieve the bytecode from the bytecode provider [" + AnnotationReader.BYTECODE_PROVIDER.getClass().getName() + "]", e);
            }
            ClassReader cr = new ClassReader(bytes);
            ClassWriter cw = new ClassWriter(false, true);
            cr.accept(
                    new ClassAdapter(cw) {
View Full Code Here

Examples of org.codehaus.backport175.reader.ReaderException

        final ClassLoader loader = klass.getClassLoader();
        final byte[] bytes;
        try {
            bytes = BYTECODE_PROVIDER.getBytecode(className, loader);
        } catch (Exception e) {
            throw new ReaderException("could not retrieve the bytecode from the bytecode provider [" + BYTECODE_PROVIDER.getClass().getName() + "]", e);
        }
        ClassReader classReader = new ClassReader(bytes);
        ClassWriter writer = new ClassWriter(true);
        classReader.accept(new AnnotationRetrievingVisitor(writer), false);
    }
View Full Code Here

Examples of org.codehaus.backport175.reader.ReaderException

            final AnnotationElement.Annotation newDefaults = new AnnotationElement.Annotation(annotationClassName);
            final byte[] bytes;
            try {
                bytes = AnnotationReader.getBytecodeFor(annotationClassName, loader);
            } catch (Exception e) {
                throw new ReaderException("could not retrieve the bytecode from the bytecode provider for class [" + annotationClassName+ "]", e);
            }
            ClassReader cr = new ClassReader(bytes);
            ClassWriter cw = new ClassWriter(false, true);
            cr.accept(
                    new ClassAdapter(cw) {
View Full Code Here

Examples of org.codehaus.backport175.reader.ReaderException

        final ClassLoader loader = classKey.getClassLoader();
        final byte[] bytes;
        try {
            bytes = getBytecodeFor(className, loader);
        } catch (Exception e) {
            throw new ReaderException(
                    "could not retrieve the bytecode for class [" + className + "]", e
            );
        }
        ClassReader classReader = new ClassReader(bytes);
        ClassWriter writer = new ClassWriter(true);
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

         {
            throw (ReaderException) e;
         }
         else
         {
            throw new ReaderException(e);
         }
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

            {
               throw (ReaderException) e;
            }
            else
            {
               throw new ReaderException(e);
            }
         }
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

         {
            throw (ReaderException) e;
         }
         else
         {
            throw new ReaderException(e);
         }
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

      {
         obj = type.newInstance();
      }
      catch (InstantiationException e)
      {
         throw new ReaderException(e.getCause());
      }
      catch (IllegalAccessException e)
      {
         throw new ReaderException(e);
      }

      Class<?> theType = type;
      while (theType != null && !theType.equals(Object.class))
      {
         setFields(theType, input, obj);
         theType = theType.getSuperclass();
      }

      for (Method method : type.getMethods())
      {
         if (method.isAnnotationPresent(FormParam.class)
                 && method.getName().startsWith("set")
                 && method.getParameterTypes().length == 1)
         {
            FormParam param = method.getAnnotation(FormParam.class);
            List<InputPart> list = input.getFormDataMap()
                    .get(param.value());
            if (list == null || list.isEmpty())
               continue;
            InputPart part = list.get(0);
            // if (part == null) throw new
            // LoggableFailure("Unable to find @FormParam in multipart: " +
            // param.value());
            if (part == null)
               continue;
            Object data = part.getBody(method.getParameterTypes()[0],
                    method.getGenericParameterTypes()[0]);
            try
            {
               method.invoke(obj, data);
            }
            catch (IllegalAccessException e)
            {
               throw new ReaderException(e);
            }
            catch (InvocationTargetException e)
            {
               throw new ReaderException(e.getCause());
            }
         }
      }

      return obj;
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

            {
               field.set(obj, data);
            }
            catch (IllegalAccessException e)
            {
               throw new ReaderException(e);
            }
         }
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.spi.ReaderException

         {
            throw (ReaderException) e;
         }
         else
         {
            throw new ReaderException(e);
         }
      }
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.