@Test public void testIsJavaIdentifier() { assertEquals(false, JarAnalyzer.isJavaIdentifier("1.0")); assertEquals(true, JarAnalyzer.isJavaIdentifier("Foo")); assertEquals(false, JarAnalyzer.isJavaIdentifier("{Foo")); }
public static boolean isJavaIdentifier(String _name) { if (_name == null || _name.equals("")) return false; final char[] chars = _name.toCharArray(); for (int i = 0; i < chars.length; i++) { if (i == 0) { if (!Character.isJavaIdentifierStart(chars[i])) return false; } else { if (!Character.isJavaIdentifierPart(chars[i])) return false; } } return true; }
JarAnalyzer implements Callable<FileAnalyzer>, JarEntryWriter, FileAnalyzer { public static boolean isJavaIdentifier(String _name) { if (_name == null || _name.equals("")) return false; final char[] chars = _name.toCharArray(); for (int i = 0; i < chars.length; i++) { if (i == 0) { if (!Character.isJavaIdentifierStart(chars[i])) return false; } else { if (!Character.isJavaIdentifierPart(chars[i])) return false; } } return true; } }
JarAnalyzer implements Callable<FileAnalyzer>, JarEntryWriter, FileAnalyzer { public static boolean isJavaIdentifier(String _name) { if (_name == null || _name.equals("")) return false; final char[] chars = _name.toCharArray(); for (int i = 0; i < chars.length; i++) { if (i == 0) { if (!Character.isJavaIdentifierStart(chars[i])) return false; } else { if (!Character.isJavaIdentifierPart(chars[i])) return false; } } return true; }  }
JarAnalyzer implements Callable<FileAnalyzer>, JarEntryWriter, FileAnalyzer { public static boolean isJavaIdentifier(String _name) { if (_name == null || _name.equals("")) return false; final char[] chars = _name.toCharArray(); for (int i = 0; i < chars.length; i++) { if (i == 0) { if (!Character.isJavaIdentifierStart(chars[i])) return false; } else { if (!Character.isJavaIdentifierPart(chars[i])) return false; } } return true; }  @Override String[] getSupportedFileExtensions(); @Override final boolean canAnalyze(File _file); @Override synchronized void analyze(final File _file); void setInstrument(boolean _instrument); Path getPath(); void setParent(JarAnalyzer ja); JarAnalyzer getParent(); long getFileSize(); long getInstrumentedFileSize(); void setWorkDir(Path _p); void setRename(boolean _b); void setLibraryId(LibraryId _id); Library getLibrary(); synchronized String getSHA1(); String getFileName(); FileAnalyzer call(); final File getInstrumentedArchive(); Set<String> getClassNames(); boolean hasJARConstructs(); @Override boolean hasChilds(); @Override Set<FileAnalyzer> getChilds(boolean _recursive); synchronized Set<ConstructId> getConstructIds(); String toString(); InstrumentationControl getInstrumentationControl(); @Override InputStream getInputStream(String _regex, JarEntry _entry); @Override Map<ConstructId, Construct> getConstructs(); List<org.eclipse.steady.shared.json.model.ConstructId> getSharedConstructs(); @Override boolean containsConstruct(ConstructId _id); @Override Construct getConstruct(ConstructId _id); @Override boolean equals(Object obj); @Override int hashCode(); static boolean isJavaIdentifier(String _name); static String getFqClassname(String _jar_entry_name); static void setAppContext(Application _ctx); static Application getAppContext(); static void insertClasspath(String _url); }
JarAnalyzer implements Callable<FileAnalyzer>, JarEntryWriter, FileAnalyzer { public static boolean isJavaIdentifier(String _name) { if (_name == null || _name.equals("")) return false; final char[] chars = _name.toCharArray(); for (int i = 0; i < chars.length; i++) { if (i == 0) { if (!Character.isJavaIdentifierStart(chars[i])) return false; } else { if (!Character.isJavaIdentifierPart(chars[i])) return false; } } return true; }  @Override String[] getSupportedFileExtensions(); @Override final boolean canAnalyze(File _file); @Override synchronized void analyze(final File _file); void setInstrument(boolean _instrument); Path getPath(); void setParent(JarAnalyzer ja); JarAnalyzer getParent(); long getFileSize(); long getInstrumentedFileSize(); void setWorkDir(Path _p); void setRename(boolean _b); void setLibraryId(LibraryId _id); Library getLibrary(); synchronized String getSHA1(); String getFileName(); FileAnalyzer call(); final File getInstrumentedArchive(); Set<String> getClassNames(); boolean hasJARConstructs(); @Override boolean hasChilds(); @Override Set<FileAnalyzer> getChilds(boolean _recursive); synchronized Set<ConstructId> getConstructIds(); String toString(); InstrumentationControl getInstrumentationControl(); @Override InputStream getInputStream(String _regex, JarEntry _entry); @Override Map<ConstructId, Construct> getConstructs(); List<org.eclipse.steady.shared.json.model.ConstructId> getSharedConstructs(); @Override boolean containsConstruct(ConstructId _id); @Override Construct getConstruct(ConstructId _id); @Override boolean equals(Object obj); @Override int hashCode(); static boolean isJavaIdentifier(String _name); static String getFqClassname(String _jar_entry_name); static void setAppContext(Application _ctx); static Application getAppContext(); static void insertClasspath(String _url);  }