Here you can find the source of startsWithCommonPackagePrefix(String inputText)
public static boolean startsWithCommonPackagePrefix(String inputText)
//package com.java2s; //License from project: Apache License public class Main { public static boolean startsWithCommonPackagePrefix(String inputText) { return startsWithPrefix(inputText, new String[] { "java.", "javax.", "com.", "net.", "org." }); }/*from w ww. ja va2 s . c om*/ public static boolean startsWithPrefix(String inputText, String[] prefixes) { for (int i = 0; i < prefixes.length; i++) { if (inputText.startsWith(prefixes[i])) { return true; } } return false; } }