Package br.net.woodstock.rockframework.domain

Examples of br.net.woodstock.rockframework.domain.TooManyObjectsException


    Map<String, Object> map = this.context.getBeansOfType(clazz);
    if (map.size() == 0) {
      throw new ObjectNotFoundException("Object not found for type " + clazz.getCanonicalName());
    }
    if (map.size() > 1) {
      throw new TooManyObjectsException("To many objects found for type " + clazz.getCanonicalName());
    }

    return (T) map.values().iterator().next();
  }
View Full Code Here


    Map<String, T> map = this.context.getBeansOfType(clazz);
    if (map.size() == 0) {
      throw new ObjectNotFoundException("Object not found for type " + clazz.getCanonicalName());
    }
    if (map.size() > 1) {
      throw new TooManyObjectsException("To many objects found for type " + clazz.getCanonicalName());
    }

    return map.values().iterator().next();
  }
View Full Code Here

TOP

Related Classes of br.net.woodstock.rockframework.domain.TooManyObjectsException

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.