Returns the textual string representation of this URI instance. @return the textual string representation of this URI.
()
| 1627 | * @return the textual string representation of this URI. |
| 1628 | */ |
| 1629 | @Override |
| 1630 | public String toString() { |
| 1631 | if (string == null) { |
| 1632 | StringBuilder result = new StringBuilder(); |
| 1633 | if (scheme != null) { |
| 1634 | result.append(scheme); |
| 1635 | result.append(':'); |
| 1636 | } |
| 1637 | if (opaque) { |
| 1638 | result.append(schemespecificpart); |
| 1639 | } else { |
| 1640 | if (authority != null) { |
| 1641 | result.append("//"); //$NON-NLS-1$ |
| 1642 | result.append(authority); |
| 1643 | } |
| 1644 | |
| 1645 | if (path != null) { |
| 1646 | result.append(path); |
| 1647 | } |
| 1648 | |
| 1649 | if (query != null) { |
| 1650 | result.append('?'); |
| 1651 | result.append(query); |
| 1652 | } |
| 1653 | } |
| 1654 | |
| 1655 | if (fragment != null) { |
| 1656 | result.append('#'); |
| 1657 | result.append(fragment); |
| 1658 | } |
| 1659 | |
| 1660 | string = result.toString(); |
| 1661 | } |
| 1662 | return string; |
| 1663 | } |
| 1664 | |
| 1665 | /* |
| 1666 | * Form a string from the components of this URI, similarly to the |
no test coverage detected