Package net.jini.config

Examples of net.jini.config.NoSuchEntryException


                    lastReturn = new Primitive(subCase[1]);
                    return lastReturn;
                }
            }
        }
  throw new NoSuchEntryException(
          "entry not found for component " + component +
          ", name " + name);
    };
View Full Code Here


    /**
     * This method performs all actions mentioned in class description.
     */
    public void run() throws Exception {
        NoSuchEntryException ce;
        ce = new NoSuchEntryException(null);
        assertion(ce.getMessage() == null);

        ce = new NoSuchEntryException("");
        assertion(ce.getMessage().equals(""));

        String message = "Some message";
        ce = new NoSuchEntryException(message);
        assertion(ce.getMessage().equals(message));

        ce = new NoSuchEntryException(null, null);
        assertion(ce.getMessage() == null);
        assertion(ce.getCause() == null);

        ce = new NoSuchEntryException("", null);
        assertion(ce.getMessage().equals(""));
        assertion(ce.getCause() == null);

        ce = new NoSuchEntryException(message, null);
        assertion(ce.getMessage().equals(message));
        assertion(ce.getCause() == null);

        Exception e = new Exception();
        ce = new NoSuchEntryException(null, e);
        assertion(ce.getMessage() == null);
        assertion(ce.getCause().equals(e));

        ce = new NoSuchEntryException("", e);
        assertion(ce.getMessage().equals(""));
        assertion(ce.getCause().equals(e));

        ce = new NoSuchEntryException(message, e);
        assertion(ce.getMessage().equals(message));
        assertion(ce.getCause().equals(e));
    }
View Full Code Here

        // 12
        final Throwable[] exceptionList2 = {
              new ConfigurationException(""),
              new ConfigurationNotFoundException(""),
              new NoSuchEntryException(""),
              new Error() };
        for (int e = 0; e < exceptionList2.length; ++e) {
            Throwable testException = exceptionList2[e];
            logger.log(Level.INFO, "-- subcase: " + testException);
            conf = new FakeAbstractConfiguration();
View Full Code Here

                    lastReturn = new Primitive(subCase[1]);
                    return lastReturn;
                }
            }
        }
  throw new NoSuchEntryException(
          "entry not found for component " + component +
          ", name " + name);
    };
View Full Code Here

        if (component == null || name == null || type == null) {
            throw new IllegalArgumentException("Component, name, and type cannot be null");
        }
        Entry entry = entries.get(component + '.' + name);
        if (entry == null) {
            throw new NoSuchEntryException("Entry not found for component [" + component + "], name [" + name + "]");
        }
        if (type == entry.type || type.isAssignableFrom(entry.type)) {
            if (entry.type.isPrimitive()) {
                return new Primitive(entry.value);
            } else {
View Full Code Here

TOP

Related Classes of net.jini.config.NoSuchEntryException

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.