Package com.bansheeproject.xmlbuilder.annotations

Examples of com.bansheeproject.xmlbuilder.annotations.PreferredType


  protected Object createObject(Class<?> clazz) throws InstantiationException {
    return ReflectionsUtils.instantiate(clazz);
  }
 
  protected Collection spawnCollection (Invocable invocable) throws InstantiationException {
    PreferredType preferredType = invocable.getAnnotation(PreferredType.class);
    if (preferredType == null)
      throw new RuntimeException("Cannot instantiate the property " + invocable.getMessageName() + ". It requires a @PreferredType describing what the actual type is.");
    Collection collection = (Collection)ReflectionsUtils.instantiate(preferredType.value());
    return collection;
  }
View Full Code Here

TOP

Related Classes of com.bansheeproject.xmlbuilder.annotations.PreferredType

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.