protected String computeQualifiedName(JInitializer initializer) { JNode parent = initializer.getParent(); if (parent != null) { int index = getFacadeHelper().getChildren(parent, JInitializer.class).indexOf(initializer); return parent.getQualifiedName() + "." + index; } return null; }
protected String getName(JInitializer initializer) { JNode parent = initializer.getParent(); if (parent != null) { int index = getFacadeHelper().getChildren(parent, JInitializer.class).indexOf(initializer); return parent.getName() + "." + index; } return null; }
protected String getName(JInitializer initializer) { JNode parent = initializer.getParent(); if (parent != null) { int index = getFacadeHelper().getChildren(parent, JInitializer.class).indexOf(initializer); return parent.getName() + "." + index; } return null; }
protected String computeQualifiedName(JInitializer initializer) { JNode parent = initializer.getParent(); if (parent != null) { int index = getFacadeHelper().getChildren(parent, JInitializer.class).indexOf(initializer); return parent.getQualifiedName() + "." + index; } return null; }
/** * Returns the first public type in of a compilation unit. * @param compilationUnit * @return the first public type of a compilation unit */ public JType getMainType(JCompilationUnit compilationUnit) { for (JType type : getChildren(compilationUnit, JType.class)) { if (FacadeFlags.isPublic(type.getFlags())) { return type; } } return null; }
/** * Returns the first public type in of a compilation unit. * @param compilationUnit * @return the first public type of a compilation unit */ public JType getMainType(JCompilationUnit compilationUnit) { for (JType type : getChildren(compilationUnit, JType.class)) { if (FacadeFlags.isPublic(type.getFlags())) { return type; } } return null; }