Parses the comma-separated list of class or package names in the given attribute value and adds each component to this PageDirective's vector of imported classes and packages. @param value A comma-separated string of imports.
(String value)
| 812 | * @param value A comma-separated string of imports. |
| 813 | */ |
| 814 | public void addImport(String value) { |
| 815 | int start = 0; |
| 816 | int index; |
| 817 | while ((index = value.indexOf(',', start)) != -1) { |
| 818 | imports.add(value.substring(start, index).trim()); |
| 819 | start = index + 1; |
| 820 | } |
| 821 | if (start == 0) { |
| 822 | // No comma found |
| 823 | imports.add(value.trim()); |
| 824 | } else { |
| 825 | imports.add(value.substring(start).trim()); |
| 826 | } |
| 827 | } |
| 828 | |
| 829 | /** |
| 830 | * Returns the list of imported classes and packages for this tag directive. |
no test coverage detected