Examples of converter()


Examples of org.jgroups.annotations.Property.converter()

          throw new IllegalArgumentException("Cannot get property name for method " +
              method.getName() + " which is not annotated with @Property") ;
        }
        String propertyName = getPropertyName(method) ;
        String name = obj instanceof Protocol? ((Protocol)obj).getName() : obj.getClass().getName();
        PropertyConverter propertyConverter=(PropertyConverter)annotation.converter().newInstance();
        if(propertyConverter == null) {           
          throw new Exception("Could not find property converter for method " + propertyName
              + " in " + name);
        }
        Object converted = null ;
View Full Code Here

Examples of org.jgroups.annotations.Property.converter()

        Property annotation=field.getAnnotation(Property.class);
        if (annotation == null) {
          throw new IllegalArgumentException("Cannot check converter for field " +
              field.getName() + " which is not annotated with @Property") ;
        }
          return annotation.converter().equals(PropertyConverters.Default.class) ;
        }
       
    }
View Full Code Here

Examples of org.jgroups.annotations.Property.converter()

            for(Field field: fields) {
                if(field.isAnnotationPresent(Property.class)) {
                    Object value=Util.getField(field, prot);
                    if(value != null) {
                        annotation=field.getAnnotation(Property.class);
                        Class<?> conv_class=annotation.converter();
                        PropertyConverter conv=null;
                        try {
                            conv=(PropertyConverter)conv_class.newInstance();
                        }
                        catch(Exception e) {
View Full Code Here

Examples of org.jgroups.annotations.Property.converter()

                    possible_names.add(Util.methodNameToAttributeName(methodName));
                    Field field=Util.findField(prot, possible_names);
                    if(field != null) {
                        Object value=Util.getField(field, prot);
                        if(value != null) {
                            Class<?> conv_class=annotation.converter();
                            PropertyConverter conv=null;
                            try {
                                conv=(PropertyConverter)conv_class.newInstance();
                            }
                            catch(Exception e) {
View Full Code Here

Examples of org.jgroups.annotations.Property.converter()

            for(Field field: fields) {
                if(field.isAnnotationPresent(Property.class)) {
                    Object value=Configurator.getField(field, prot);
                    if(value != null) {
                        annotation=field.getAnnotation(Property.class);
                        Class<?> conv_class=annotation.converter();
                        PropertyConverter conv=null;
                        try {
                            conv=(PropertyConverter)conv_class.newInstance();
                        }
                        catch(Exception e) {
View Full Code Here

Examples of org.jgroups.annotations.Property.converter()

                    possible_names.add(Util.methodNameToAttributeName(methodName));
                    Field field=findField(prot, possible_names);
                    if(field != null) {
                        Object value=Configurator.getField(field, prot);
                        if(value != null) {
                            Class<?> conv_class=annotation.converter();
                            PropertyConverter conv=null;
                            try {
                                conv=(PropertyConverter)conv_class.newInstance();
                            }
                            catch(Exception e) {
View Full Code Here

Examples of org.strecks.bind.annotation.BindSimple.converter()

    {
      handler.setConverter(converter);
    }
    else
    {
      Class<? extends Converter> converterClass = bindAnnotation.converter();
      converter = ReflectHelper.createInstance(converterClass, Converter.class);
      handler.setConverter(converter);
    }

    PropertyDescriptor property = BeanUtils.findPropertyForMethod(getterMethod);
View Full Code Here

Examples of org.strecks.injection.annotation.InjectRequestParameter.converter()

  public InjectionHandler createInjectionHandler(Annotation annotation, Class clazz, PropertyDescriptor propertyDescriptor)
  {

    InjectRequestParameter input = (InjectRequestParameter) annotation;

    Class converterClass = input.converter();
    Converter converter = RequestParameterFactory.createConverter(propertyDescriptor.getPropertyType(), converterClass);
    String parameterName = AnnotationFactoryUtils.getAttributeName(propertyDescriptor.getName(), input.name());
    boolean required = input.required();

    // make sure that converter has String generic type
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.