@Test(expected = NullPointerException.class) public void testIsStaticUtilityClassNull() throws Exception { LogManagerProperties.isStaticUtilityClass((String) null); }
static boolean isStaticUtilityClass(String name) throws Exception { final Class<?> c = findClass(name); final Class<?> obj = Object.class; Method[] methods = c.getMethods(); boolean util; if (c != obj && methods.length != 0) { util = true; for (Method m : methods) { if (m.getDeclaringClass() != obj && !Modifier.isStatic(m.getModifiers())) { util = false; break; } } } else { util = false; } return util; }
LogManagerProperties extends Properties { static boolean isStaticUtilityClass(String name) throws Exception { final Class<?> c = findClass(name); final Class<?> obj = Object.class; Method[] methods = c.getMethods(); boolean util; if (c != obj && methods.length != 0) { util = true; for (Method m : methods) { if (m.getDeclaringClass() != obj && !Modifier.isStatic(m.getModifiers())) { util = false; break; } } } else { util = false; } return util; } }
LogManagerProperties extends Properties { static boolean isStaticUtilityClass(String name) throws Exception { final Class<?> c = findClass(name); final Class<?> obj = Object.class; Method[] methods = c.getMethods(); boolean util; if (c != obj && methods.length != 0) { util = true; for (Method m : methods) { if (m.getDeclaringClass() != obj && !Modifier.isStatic(m.getModifiers())) { util = false; break; } } } else { util = false; } return util; } LogManagerProperties(final Properties parent, final String prefix); }
LogManagerProperties extends Properties { static boolean isStaticUtilityClass(String name) throws Exception { final Class<?> c = findClass(name); final Class<?> obj = Object.class; Method[] methods = c.getMethods(); boolean util; if (c != obj && methods.length != 0) { util = true; for (Method m : methods) { if (m.getDeclaringClass() != obj && !Modifier.isStatic(m.getModifiers())) { util = false; break; } } } else { util = false; } return util; } LogManagerProperties(final Properties parent, final String prefix); @Override @SuppressWarnings("CloneDoesntCallSuperClone") synchronized Object clone(); @Override synchronized String getProperty(final String key); @Override String getProperty(final String key, final String def); @Override Object get(final Object key); @Override synchronized Object put(final Object key, final Object value); @Override Object setProperty(String key, String value); @Override boolean containsKey(final Object key); @Override synchronized Object remove(final Object key); @Override Enumeration<?> propertyNames(); @Override boolean equals(final Object o); @Override int hashCode(); }
LogManagerProperties extends Properties { static boolean isStaticUtilityClass(String name) throws Exception { final Class<?> c = findClass(name); final Class<?> obj = Object.class; Method[] methods = c.getMethods(); boolean util; if (c != obj && methods.length != 0) { util = true; for (Method m : methods) { if (m.getDeclaringClass() != obj && !Modifier.isStatic(m.getModifiers())) { util = false; break; } } } else { util = false; } return util; } LogManagerProperties(final Properties parent, final String prefix); @Override @SuppressWarnings("CloneDoesntCallSuperClone") synchronized Object clone(); @Override synchronized String getProperty(final String key); @Override String getProperty(final String key, final String def); @Override Object get(final Object key); @Override synchronized Object put(final Object key, final Object value); @Override Object setProperty(String key, String value); @Override boolean containsKey(final Object key); @Override synchronized Object remove(final Object key); @Override Enumeration<?> propertyNames(); @Override boolean equals(final Object o); @Override int hashCode();  }