public interface Importer<O extends JavaSource<O>>
| Modifier and Type | Method and Description |
|---|---|
Import |
addImport(Class<?> type)
Add an import for the given
Class type. |
Import |
addImport(Import imprt)
Add an import for the given
Import type. |
Import |
addImport(String className)
Add an import by qualified class name.
|
<T extends JavaSource<?>> |
addImport(T type)
Add an import for the given
JavaSource type. |
Import |
getImport(Class<?> type)
|
Import |
getImport(Import imprt)
|
Import |
getImport(String literalValue)
Get the
Import for the given fully-qualified class name, if it exists; otherwise, return null; |
<T extends JavaSource<?>> |
getImport(T type)
Get the
Import for the given T type, if it exists; otherwise, return null; |
List<Import> |
getImports()
Get an immutable list of all
Imports currently imported by this O |
boolean |
hasImport(Class<?> type)
Return whether or not this
O has an import for the given Class type. |
boolean |
hasImport(Import imprt)
Return whether or not this
O has the given Import type. |
boolean |
hasImport(String type)
Return whether or not this
O has an import for the given fully-qualified class name. |
<T extends JavaSource<T>> |
hasImport(T type)
Return whether or not this
O has an import for the given T type. |
O |
removeImport(Class<?> type)
|
O |
removeImport(Import imprt)
Remove the given
Import from this O instance, if it exists; otherwise, do nothing; |
O |
removeImport(String name)
Remove any
Import for the given fully-qualified class name, if it exists; otherwise, do nothing; |
<T extends JavaSource<?>> |
removeImport(T type)
Remove any
Import for the given T type, if it exists; otherwise, do nothing; |
boolean |
requiresImport(Class<?> type)
Return whether or not this
O could accept an import for the given Class type. |
boolean |
requiresImport(String type)
Return whether or not this
O could accept an import for the given fully-qualified class name. |
String |
resolveType(String type)
Given a simple or qualified type, resolve that type against the available imports and return the referenced type.
|
Import addImport(String className)
<T extends JavaSource<?>> Import addImport(T type)
JavaSource type.boolean hasImport(Class<?> type)
O has an import for the given Class type.boolean hasImport(String type)
O has an import for the given fully-qualified class name.boolean requiresImport(Class<?> type)
O could accept an import for the given Class type.boolean requiresImport(String type)
O could accept an import for the given fully-qualified class name.<T extends JavaSource<T>> boolean hasImport(T type)
O has an import for the given T type.Import getImport(String literalValue)
Import for the given fully-qualified class name, if it exists; otherwise, return null;<T extends JavaSource<?>> Import getImport(T type)
Import for the given T type, if it exists; otherwise, return null;O removeImport(String name)
Import for the given fully-qualified class name, if it exists; otherwise, do nothing;<T extends JavaSource<?>> O removeImport(T type)
Import for the given T type, if it exists; otherwise, do nothing;O removeImport(Import imprt)
Import from this O instance, if it exists; otherwise, do nothing;List<Import> getImports()
Imports currently imported by this OCopyright © 2013 JBoss by Red Hat. All Rights Reserved.