/*
* JavaInspect - Utility to visualize java software
- * Copyright (C) 2013, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Copyright (C) 2013-2015, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
*
* This program is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation.
+ * modify it under the terms of version 3 of the GNU Lesser General Public License
+ * or later as published by the Free Software Foundation.
*/
package eu.svjatoslav.inspector.java.structure;
private static final List<String> systemDataTypes = new ArrayList<String>();
- private static final List<String> systemMethods = new ArrayList<String>();
+ private static final List<String> commonObjectMethods = new ArrayList<String>();
private static final List<String> systemPackages = new ArrayList<String>();
initSystemDataTypes();
initDarkColors();
initLightColors();
- initSystemMethods();
+ initCommonObjectMethods();
initSystemPackages();
}
return lightColors.get(lastChosenLightColor);
}
+ public static void initCommonObjectMethods() {
+ commonObjectMethods.add("wait");
+ commonObjectMethods.add("equals");
+ commonObjectMethods.add("toString");
+ commonObjectMethods.add("hashCode");
+ commonObjectMethods.add("notify");
+ commonObjectMethods.add("notifyAll");
+ commonObjectMethods.add("getClass");
+ }
+
public static void initDarkColors() {
darkColors.add("antiquewhite4");
darkColors.add("blueviolet");
systemDataTypes.add("byte");
}
- public static void initSystemMethods() {
- systemMethods.add("wait");
- systemMethods.add("equals");
- systemMethods.add("toString");
- systemMethods.add("hashCode");
- systemMethods.add("notify");
- systemMethods.add("notifyAll");
- systemMethods.add("getClass");
- }
-
public static void initSystemPackages() {
systemPackages.add("java.");
systemPackages.add("javax.");
systemPackages.add("sun.");
}
+ public static boolean isCommonObjectMethod(final String name) {
+ return commonObjectMethods.contains(name);
+ }
+
public static boolean isEnumMethod(final String name) {
return enumMethods.contains(name);
}
return systemDataTypes.contains(name);
}
- public static boolean isSystemMethod(final String name) {
- return systemMethods.contains(name);
- }
-
public static boolean isSystemPackage(final String name) {
for (final String packagePrefix : systemPackages)