ApexQualifiedName implements QualifiedName { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(nameSpace).append("__"); sb.append(classes[0]); if (classes.length > 1) { sb.append('.').append(classes[1]); } if (isOperation()) { sb.append("#").append(operation); } return sb.toString(); } private  ApexQualifiedName(String nameSpace, String[] classes, String operation); String getOperation(); String[] getClasses(); String getNameSpace(); @Override boolean isClass(); @Override boolean isOperation(); @Override String toString(); @Override ApexQualifiedName getClassName(); @Override int hashCode(); @Override boolean equals(Object obj); static ApexQualifiedName ofString(String toParse);  }
@Test public void testTrigger() { ApexNode<Compilation> root = parse("trigger myAccountTrigger on Account (before insert, before update) {}"); List<ASTMethod> methods = root.findDescendantsOfType(ASTMethod.class); for (ASTMethod m : methods) { assertEquals("c__trigger.Account#myAccountTrigger", m.getQualifiedName().toString()); } }