X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Finspector%2Fjava%2Fstructure%2FUtils.java;h=c926d7827d251cd74fed2ac0ced3745fa56e9ba7;hb=8886bb51f2caf11b8e778bacb4c8ea18ac7f1027;hp=5feae60b4220b8bbc840c8170e8c041ee25346a7;hpb=f124664cffca475ecbfafd5d9bb33be033bf4e7d;p=javainspect.git diff --git a/src/main/java/eu/svjatoslav/inspector/java/structure/Utils.java b/src/main/java/eu/svjatoslav/inspector/java/structure/Utils.java old mode 100644 new mode 100755 index 5feae60..c926d78 --- a/src/main/java/eu/svjatoslav/inspector/java/structure/Utils.java +++ b/src/main/java/eu/svjatoslav/inspector/java/structure/Utils.java @@ -1,10 +1,10 @@ /* * JavaInspect - Utility to visualize java software - * Copyright (C) 2013, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Copyright (C) 2013-2014, 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; @@ -16,7 +16,7 @@ public class Utils { private static final List systemDataTypes = new ArrayList(); - private static final List systemMethods = new ArrayList(); + private static final List commonObjectMethods = new ArrayList(); private static final List systemPackages = new ArrayList(); @@ -35,7 +35,7 @@ public class Utils { initSystemDataTypes(); initDarkColors(); initLightColors(); - initSystemMethods(); + initCommonObjectMethods(); initSystemPackages(); } @@ -61,6 +61,16 @@ public class Utils { 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"); @@ -105,22 +115,16 @@ public class Utils { 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); } @@ -129,10 +133,6 @@ public class Utils { 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)