List of usage examples for org.eclipse.jdt.internal.compiler.env ICompilationUnit getMainTypeName
char[] getMainTypeName();
From source file:org.conqat.engine.java.ecj.EcjUtils.java
License:Apache License
/** * Get the fully qualified main type name of a compilation unit. *///from w w w . j a v a 2 s . c o m public static String getMainTypeName(ICompilationUnit compilationUnit) { String name; if (compilationUnit.getPackageName() == null) { // default package name = StringUtils.EMPTY_STRING; } else { name = String.valueOf(compilationUnit.getPackageName()) + "."; } return name + String.valueOf(compilationUnit.getMainTypeName()); }