Package org.salamandra.web.core.property

Examples of org.salamandra.web.core.property.Params


 
  @SuppressWarnings("unchecked")
  protected AbstractXmlBinding<Object> createXmlBinder(Protocol protocol, Object o) {
    try {
      Class<? extends AbstractXmlBinding> classBinding = null;
          Params params = new Params();

          for (ISetProperty property : lstProp) {
            params.addPropertyValue(property.getProperty(), property.getValue());
      }
         
      Annotation[] annotations = o.getClass().getAnnotations();

      for (Annotation annotation : annotations) {
        ABinder abstractXmlBinding = annotation.annotationType().getAnnotation( ABinder.class );
        if ( abstractXmlBinding != null ) {
                  classBinding = abstractXmlBinding.value();
                 
          Method[] mm = annotation.annotationType().getDeclaredMethods();
                  for( Method m : mm )
                  {
                        Class tClass = m.getReturnType();
                    
                        AParam aParam = (AParam) tClass.getComponentType().getAnnotation( AParam.class );
                       
                        if ( aParam!=null ) {
                          Annotation[] aValue = (Annotation[]) m.invoke(annotation);
                          for (Annotation ref : aValue) {
                           
                            Method mv = ref.annotationType().getDeclaredMethod("value");
                            Object v = mv.invoke(ref);
                           
                            params.addParameter(aParam.type(), v);
              }
                        }
                  }
        }
      }
View Full Code Here

TOP

Related Classes of org.salamandra.web.core.property.Params

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.