Interface InterfaceCapableSource<T extends JavaSource<T>>
-
- All Superinterfaces:
InterfaceCapable
- All Known Subinterfaces:
JavaClassSource,JavaEnumSource,JavaInterfaceSource
public interface InterfaceCapableSource<T extends JavaSource<T>> extends InterfaceCapable
Represents aJavaSourcethat may implement one or more interfaces.- Author:
- Lincoln Baxter, III
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TaddInterface(Class<?> type)Implements the specifiedClassinterfaceTaddInterface(String type)Implements the specified interface nameTaddInterface(JavaInterface<?> type)Implements the specifiedJavaInterfaceTimplementInterface(Class<?> type)Implements the specifiedClassinterface and import their abstract methods, if any.TimplementInterface(JavaInterface<?> type)Implements the specifiedJavaInterfaceand import their abstract methods, if any.TremoveInterface(Class<?> type)Removes the specified interfaceTremoveInterface(String type)Removes the specified interface FQNTremoveInterface(JavaInterface<?> type)Removes the specified interface-
Methods inherited from interface org.jboss.forge.roaster.model.InterfaceCapable
getInterfaces, hasInterface, hasInterface, hasInterface
-
-
-
-
Method Detail
-
addInterface
T addInterface(String type)
Implements the specified interface name- Parameters:
type- the interface FQN- Returns:
- this object
-
addInterface
T addInterface(Class<?> type)
Implements the specifiedClassinterface- Parameters:
type- the interfaceClassreference- Returns:
- this object
-
implementInterface
T implementInterface(Class<?> type)
Implements the specifiedClassinterface and import their abstract methods, if any.- Parameters:
type- the interfaceClassreference- Returns:
- this object
- See Also:
Methods.implementAbstractMethods(Class, MethodHolderSource)
-
implementInterface
T implementInterface(JavaInterface<?> type)
Implements the specifiedJavaInterfaceand import their abstract methods, if any.- Parameters:
type- the interfaceJavaInterfacereference- Returns:
- this object
- See Also:
Methods#implementAbstractMethods(JavaInterface, MethodHolderSource)
-
addInterface
T addInterface(JavaInterface<?> type)
Implements the specifiedJavaInterface- Parameters:
type- the interface- Returns:
- this object
-
removeInterface
T removeInterface(String type)
Removes the specified interface FQN- Parameters:
type- the interface FQN- Returns:
- this object
-
removeInterface
T removeInterface(Class<?> type)
Removes the specified interface- Parameters:
type- the interfaceClass- Returns:
- this object
-
removeInterface
T removeInterface(JavaInterface<?> type)
Removes the specified interface- Parameters:
type- the interfaceJavaInterface- Returns:
- this object
-
-