use of com.kyj.fx.voeditor.core.model.meta.ClassMeta in project Gargoyle by callakrsos.
the class FxDaoCommons method isDuplicated.
/**
* 파라미터 클래스정보에 동일한 클래스타입이 존재하는지 확인한다.
*
* @작성자 : KYJ
* @작성일 : 2015. 10. 28.
* @param params
* @return
*/
public boolean isDuplicated(List<ClassMeta> params) {
if (params != null) {
Set<String> set = new HashSet<>();
for (ClassMeta meta : params) {
String key = meta.getPackageName() + meta.getName();
if (set.contains(key))
return true;
set.add(key);
}
}
return false;
}
use of com.kyj.fx.voeditor.core.model.meta.ClassMeta in project Gargoyle by callakrsos.
the class VOEditorParser2 method main.
public static void main(String[] args) throws ParseException, IOException {
String fileName = "C:\\Users\\KYJ\\JAVA_FX\\gagoyleWorkspace\\VisualFxVoEditor\\src\\main\\java\\com\\kyj\\fx\\voeditor\\visual\\main\\model\\vo\\ClassPathEntry.java";
FileInputStream in = new FileInputStream(fileName);
CompilationUnit cu;
try {
// parse the file
cu = JavaParser.parse(in);
} finally {
in.close();
}
PackageDeclaration packageDeclaration = cu.getPackage();
// System.out.println(packageDeclaration.getName().toString());
// System.out.println();
// System.out.println(String.format("package name : %s",
// packageDeclaration.getName().getName()));
ClassMeta classMeta = new ClassMeta("");
classMeta.setPackageName(packageDeclaration.getName().toString());
ArrayList<FieldMeta> fields = new ArrayList<FieldMeta>();
VoEditor voEditor = new VoEditor(classMeta, fields);
List<Node> childrenNodes = cu.getChildrenNodes();
for (Node n : childrenNodes) {
}
new MethodVisitor().visit(cu, null);
}
Aggregations