org.jboss.forge.parser.java
Interface Importer<O extends JavaSource<?>>

All Known Subinterfaces:
JavaAnnotation, JavaClass, JavaEnum, JavaInterface, JavaSource<T>, JavaType<T>

public interface Importer<O extends JavaSource<?>>

Author:
Lincoln Baxter, III

Method Summary
 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<?>>
Import
addImport(T type)
          Add an import for the given JavaSource type.
 Import getImport(Class<?> type)
          Get the Import for the given Class type, if it exists; otherwise, return null;
 Import getImport(Import imprt)
          Get the Import of the given Import type, if it exists; otherwise, return null;
 Import getImport(String literalValue)
          Get the Import for the given fully-qualified class name, if it exists; otherwise, return null;
<T extends JavaSource<?>>
Import
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>>
boolean
hasImport(T type)
          Return whether or not this O has an import for the given T type.
 O removeImport(Class<?> type)
          Remove any Import for the given Class type, if it exists; otherwise, do nothing;
 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<?>>
O
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.
 

Method Detail

addImport

Import addImport(String className)
Add an import by qualified class name. (E.g: "com.example.Imported") unless it is in the provided 'java.lang.*' package.


addImport

Import addImport(Class<?> type)
Add an import for the given Class type.


addImport

Import addImport(Import imprt)
Add an import for the given Import type.


addImport

<T extends JavaSource<?>> Import addImport(T type)
Add an import for the given JavaSource type.


hasImport

boolean hasImport(Class<?> type)
Return whether or not this O has an import for the given Class type.


hasImport

boolean hasImport(String type)
Return whether or not this O has an import for the given fully-qualified class name.


requiresImport

boolean requiresImport(Class<?> type)
Return whether or not this O could accept an import for the given Class type.


requiresImport

boolean requiresImport(String type)
Return whether or not this O could accept an import for the given fully-qualified class name.


hasImport

<T extends JavaSource<T>> boolean hasImport(T type)
Return whether or not this O has an import for the given T type.


hasImport

boolean hasImport(Import imprt)
Return whether or not this O has the given Import type.


getImport

Import getImport(String literalValue)
Get the Import for the given fully-qualified class name, if it exists; otherwise, return null;


getImport

Import getImport(Class<?> type)
Get the Import for the given Class type, if it exists; otherwise, return null;


getImport

<T extends JavaSource<?>> Import getImport(T type)
Get the Import for the given T type, if it exists; otherwise, return null;


getImport

Import getImport(Import imprt)
Get the Import of the given Import type, if it exists; otherwise, return null;


removeImport

O removeImport(String name)
Remove any Import for the given fully-qualified class name, if it exists; otherwise, do nothing;


removeImport

O removeImport(Class<?> type)
Remove any Import for the given Class type, if it exists; otherwise, do nothing;


removeImport

<T extends JavaSource<?>> O removeImport(T type)
Remove any Import for the given T type, if it exists; otherwise, do nothing;


removeImport

O removeImport(Import imprt)
Remove the given Import from this O instance, if it exists; otherwise, do nothing;


getImports

List<Import> getImports()
Get an immutable list of all Imports currently imported by this O



Copyright © 2011 Seam Framework. All Rights Reserved.