Package jfun.util.beans

Examples of jfun.util.beans.BeanType


   * if the property is not rreadable or if the property is not indexed.
   */ 
  public static Component indexed_getter(Class type, Object obj, String prop, int ind)
  throws IntrospectionException, NoSuchPropertyException,
  NonReadablePropertyException{
    final BeanType btype = BeanType.instance(type);
    final Method m = btype.getIndexedReader(prop);
    if(m==null)
      throw new NonReadablePropertyException(type, prop);
    return fun(Functions.indexed_getter(Bean.instance(type, obj), prop, ind));
  }
View Full Code Here


   * if the property is not writable or not indexed.
   */
  public static <T> Component<T> indexed_setter(Class type, T obj, String prop, int ind)
  throws IntrospectionException, NoSuchPropertyException,
  NonWritablePropertyException{
    final BeanType btype = BeanType.instance(type);
    final Method m = btype.getIndexedWriter(prop);
    if(m==null)
      throw new NonWritablePropertyException(type, prop);
    return fun(Functions.indexed_setter(Bean.instance(type, obj), prop, ind));
  }
View Full Code Here

   * @throws IntrospectionException
   */
  public static PropertiesInjector instance(Class type,
      MemberPredicate pred)
  throws IntrospectionException{
    final BeanType bt = Utils.toBeanType(type);
    return new FilteredPropertiesInjector(bt, pred);
  }
View Full Code Here

    if(obj==null){
      throw new NullBeanObjectException("null component");
    }
    //dynamically resolve bean type and properties if necessary.
    final Class objtype = obj.getClass();
    final BeanType btype = obtainBeanType(objtype);
    final Set props = getPropertyNames(btype);
    Utils.injectProperties(btype, obj, props, dep);
   }
View Full Code Here

    Utils.injectProperties(btype, obj, props, dep);
   }
  public void verifyProperties(Class type, Dependency dep){
    //dynamically resolve bean type and properties if necessary.
    //the type cannot be null now.
    final BeanType btype = obtainBeanType(type);
    final Set props = getPropertyNames(btype);
    Utils.verifyProperties(btype, props, dep);
  }
View Full Code Here

TOP

Related Classes of jfun.util.beans.BeanType

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.