* compilation unit was created from, or null if it was not created
* from a Java type root.
*/
public BodyDeclaration getTypeRoot() {
if (resultCompilationUnit != null) {
BodyDeclaration typeDec = null;
for (Object typeObject : resultCompilationUnit.types()) {
BodyDeclaration typeBodyDec = (BodyDeclaration) typeObject;
if (typeBodyDec.getNodeType() == BodyDeclaration.TYPE_DECLARATION) {
TypeDeclaration type = (TypeDeclaration) typeBodyDec;
if (type.getName().getFullyQualifiedName()
.equals(getProperty(ResultProperty.NAME)))
typeDec = type;
}
if (typeBodyDec.getNodeType() == BodyDeclaration.ENUM_DECLARATION) {
EnumDeclaration type = (EnumDeclaration) typeBodyDec;
if (type.getName().getFullyQualifiedName()
.equals(getProperty(ResultProperty.NAME)))
typeDec = type;
}