ASTNode (int role) { LOG.assertTrue(ChildRole.isUnique(role)); switch(role){ default: return null; case ChildRole.BASE_CLASS_REFERENCE: return getFirstChildNode().getElementType() == JavaElementType.JAVA_CODE_REFERENCE ? getFirstChildNode() : null; case ChildRole.ARGUMENT_LIST: return findChildByType(JavaElementType.EXPRESSION_LIST); case ChildRole.LBRACE: return findChildByType(JavaTokenType.LBRACE); case ChildRole.RBRACE: return TreeUtil.findChildBackward(this, JavaTokenType.RBRACE); } }