ASTNode (int role) { LOG.assertTrue(ChildRole.isUnique(role)); switch(role){ default: return null; case ChildRole.IMPORT_KEYWORD: return getFirstChildNode(); case ChildRole.IMPORT_ON_DEMAND_DOT: return findChildByType(JavaTokenType.DOT); case ChildRole.IMPORT_ON_DEMAND_ASTERISK: return findChildByType(JavaTokenType.ASTERISK); case ChildRole.CLOSING_SEMICOLON: return TreeUtil.findChildBackward(this, JavaTokenType.SEMICOLON); } }