Package net.thucydides.core.annotations

Examples of net.thucydides.core.annotations.ImplementedBy


    private Class<?> getImplementer(Class<?> interfaceType) {
      if (!interfaceType.isInterface()){
        throw new NotImplementedException(interfaceType.getSimpleName() +
            " is not an interface");
      }
      ImplementedBy implBy = interfaceType.getAnnotation(ImplementedBy.class);
      if (implBy == null){
        throw new NotImplementedException(interfaceType.getSimpleName() +
            " is not implemented by any class (or not annotated by @ImplementedBy)");
      }
      Class<?> implementerClass = implBy.value();
      if (!interfaceType.isAssignableFrom(implementerClass)) {
        throw new NotImplementedException("implementer Class does not implement the interface " + interfaceType.getName());
      }
      return implementerClass;
    }
View Full Code Here

TOP

Related Classes of net.thucydides.core.annotations.ImplementedBy

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.