Examples of AnnotatedMethod


Examples of com.fasterxml.jackson.databind.introspect.AnnotatedMethod

    @Override
    public List<BeanPropertyWriter> changeProperties(SerializationConfig config,
        BeanDescription beanDesc, List<BeanPropertyWriter> beanProperties) {
      List<BeanPropertyWriter> result = new ArrayList<BeanPropertyWriter>();
      for (BeanPropertyWriter writer : beanProperties) {
        AnnotatedMethod setter = beanDesc.findMethod(
            "set" + StringUtils.capitalize(writer.getName()),
            new Class<?>[] { writer.getPropertyType() });
        if (setter != null
            && this.conversionService.canConvert(String.class,
                writer.getPropertyType())) {
View Full Code Here

Examples of com.fasterxml.jackson.databind.introspect.AnnotatedMethod

    @Override
    public List<BeanPropertyWriter> changeProperties(SerializationConfig config,
        BeanDescription beanDesc, List<BeanPropertyWriter> beanProperties) {
      List<BeanPropertyWriter> result = new ArrayList<BeanPropertyWriter>();
      for (BeanPropertyWriter writer : beanProperties) {
        AnnotatedMethod setter = beanDesc.findMethod(
            "set" + StringUtils.capitalize(writer.getName()),
            new Class<?>[] { writer.getPropertyType() });
        if (setter != null
            && this.conversionService.canConvert(String.class,
                writer.getPropertyType())) {
View Full Code Here

Examples of com.fasterxml.jackson.databind.introspect.AnnotatedMethod

            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("Ignoring transient member " + m);
            }
            return true;
        } else if (m instanceof AnnotatedMethod) {
            AnnotatedMethod method = (AnnotatedMethod) m;
            String methodName = method.getName();
            // lets see if there is a transient field of the same name as the getter
            if (methodName.startsWith("get") && method.getParameterCount() == 0) {
                String fieldName = Introspector.decapitalize(methodName.substring(3));
                Class<?> declaringClass = method.getDeclaringClass();
                Field field = findField(fieldName, declaringClass);
                if (field != null) {
                    int fieldModifiers = field.getModifiers();
                    if (Modifier.isTransient(fieldModifiers)) {
                        LOG.fine("Ignoring member " + m + " due to transient field called " + fieldName);
View Full Code Here

Examples of com.sun.jersey.core.reflection.AnnotatedMethod

  protected Set<Class> getDefiningClasses(AbstractResource resourceClass) {
    HashSet<Class> definingClasses = new HashSet<Class>();

    for (AbstractResourceMethod resourceMethod : resourceClass.getResourceMethods()) {
      definingClasses.add(new AnnotatedMethod(resourceMethod.getMethod()).getMethod().getDeclaringClass());
    }

    for (AbstractResourceMethod resourceMethod : resourceClass.getSubResourceMethods()) {
      definingClasses.add(new AnnotatedMethod(resourceMethod.getMethod()).getMethod().getDeclaringClass());
    }

    for (AbstractSubResourceLocator locator : resourceClass.getSubResourceLocators()) {
      definingClasses.add(new AnnotatedMethod(locator.getMethod()).getMethod().getDeclaringClass());
    }

    return definingClasses;
  }
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedMethod

        assertTrue(cat.isAnnotationPresent(Named.class));
        assertTrue(cat.isAnnotationPresent(Alternative.class));
        assertTrue(cat.isAnnotationPresent(ApplicationScoped.class));
        assertEquals("tomcat", cat.getAnnotation(Named.class).value());
       
        AnnotatedMethod observerMethod = null;
        for (AnnotatedMethod m : cat.getMethods())
        {
            if ("doSomeObservation".equals(m.getJavaMember().getName()))
            {
                observerMethod = m;
                break;
            }
        }
        assertNotNull(observerMethod);
        observerMethod.isAnnotationPresent(Observes.class);
       
        {
            // test reading from an AnnotatedType
            AnnotatedTypeBuilder<Cat> builder2 = new AnnotatedTypeBuilder<Cat>();
            builder2.readFromType(cat);
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedMethod

      parameters.addAll(method.getParameters());
      parameters.set(parameters.indexOf(param), addUniqueQualifier(method, param));
      parameters.remove(param);

      return new AnnotatedMethod()
      {
         @Override
         public List<AnnotatedParameter> getParameters()
         {
            return parameters;
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedMethod

        List<InjectionPoint> lists = new ArrayList<InjectionPoint>();

        AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();
        AnnotatedType<?> annotated = annotatedElementFactory.newAnnotatedType(member.getDeclaringClass());
        AnnotatedMethod method = annotatedElementFactory.newAnnotatedMethod(member, annotated);
        List<AnnotatedParameter<?>> parameters = method.getParameters();

        InjectionPoint point = null;

        for(AnnotatedParameter<?> parameter : parameters)
        {
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedMethod

        Asserts.assertNotNull(member, "member parameter can not be null");

        List<InjectionPoint> lists = new ArrayList<InjectionPoint>();
       
        AnnotatedType<?> annotated = AnnotatedElementFactory.newAnnotatedType(member.getDeclaringClass());
        AnnotatedMethod method = AnnotatedElementFactory.newAnnotatedMethod(member, annotated);
        List<AnnotatedParameter<?>> parameters = method.getParameters();
       
        InjectionPoint point = null;
       
        for(AnnotatedParameter<?> parameter : parameters)
        {
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedMethod

        Asserts.assertNotNull(owner, "owner parameter can not be null");
        Asserts.assertNotNull(member, "member parameter can not be null");

        List<InjectionPoint> lists = new ArrayList<InjectionPoint>();

        AnnotatedMethod method = AnnotatedElementFactory.newAnnotatedMethod(member, member.getDeclaringClass());
        List<AnnotatedParameter<?>> parameters = method.getParameters();
       
        InjectionPoint point = null;
       
        for(AnnotatedParameter<?> parameter : parameters)
        {
View Full Code Here

Examples of javax.enterprise.inject.spi.AnnotatedMethod

        List<InjectionPoint> lists = new ArrayList<InjectionPoint>();

        AnnotatedElementFactory annotatedElementFactory = webBeansContext.getAnnotatedElementFactory();
        AnnotatedType<?> annotated = annotatedElementFactory.newAnnotatedType(member.getDeclaringClass());
        AnnotatedMethod method = annotatedElementFactory.newAnnotatedMethod(member, annotated);
        List<AnnotatedParameter<?>> parameters = method.getParameters();

        InjectionPoint point = null;

        for(AnnotatedParameter<?> parameter : parameters)
        {
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.