ASTUserClass extends ApexRootNode<UserClass> implements ASTUserClassOrInterface<UserClass>,
       CanSuppressWarnings { @Override public String getImage() { String apexName = getDefiningType(); return apexName.substring(apexName.lastIndexOf('.') + 1); } @Deprecated @InternalApi  ASTUserClass(UserClass userClass); @Override Object jjtAccept(ApexParserVisitor visitor, Object data); @Override String getImage(); @Override ApexQualifiedName getQualifiedName(); @Override TypeKind getTypeKind(); @Override boolean hasSuppressWarningsAnnotationFor(Rule rule); ASTModifierNode getModifiers(); String getSuperClassName(); List<String> getInterfaceNames();  }
@Test public void testClassName() { ApexNode<Compilation> node = parse("class Foo { }"); Assert.assertSame(ASTUserClass.class, node.getClass()); Assert.assertEquals("Foo", node.getImage()); }
@Test public void testInnerClassName() { ApexNode<Compilation> node = parse("class Foo { class Bar { } }"); Assert.assertSame(ASTUserClass.class, node.getClass()); ASTUserClass innerNode = node.getFirstDescendantOfType(ASTUserClass.class); Assert.assertNotNull(innerNode); Assert.assertEquals("Bar", innerNode.getImage()); }