Interface InterfaceCapableSource<T extends JavaSource<T>>
- All Superinterfaces:
InterfaceCapable
- All Known Subinterfaces:
JavaClassSource,JavaEnumSource,JavaInterfaceSource,JavaRecordSource
Represents a
JavaSource that may implement one or more interfaces.- Author:
- Lincoln Baxter, III
-
Method Summary
Modifier and TypeMethodDescriptiondefault TaddInterface(Class<?> type) Implements the specifiedClassinterfaceaddInterface(String type) Implements the specified interface namedefault TaddInterface(JavaInterface<?> type) Implements the specifiedJavaInterfaceimplementInterface(Class<?> type) Implements the specifiedClassinterface and import their abstract methods, if any.implementInterface(JavaInterface<?> type) Implements the specifiedJavaInterfaceand import their abstract methods, if any.default TremoveInterface(Class<?> type) Removes the specified interfaceremoveInterface(String type) Removes the specified interface FQNdefault TremoveInterface(JavaInterface<?> type) Removes the specified interfaceMethods inherited from interface org.jboss.forge.roaster.model.InterfaceCapable
getInterfaces, hasInterface, hasInterface, hasInterface
-
Method Details
-
addInterface
Implements the specified interface name- Parameters:
type- the interface FQN- Returns:
- this object
-
addInterface
Implements the specifiedClassinterface- Parameters:
type- the interfaceClassreference- Returns:
- this object
-
addInterface
Implements the specifiedJavaInterface- Parameters:
type- the interface- Returns:
- this object
-
implementInterface
Implements the specifiedClassinterface and import their abstract methods, if any.- Parameters:
type- the interfaceClassreference- Returns:
- this object
- See Also:
-
implementInterface
Implements the specifiedJavaInterfaceand import their abstract methods, if any.- Parameters:
type- the interfaceJavaInterfacereference- Returns:
- this object
- See Also:
-
Methods#implementAbstractMethods(JavaInterface, MethodHolderSource)
-
removeInterface
Removes the specified interface FQN- Parameters:
type- the interface FQN- Returns:
- this object
-
removeInterface
Removes the specified interface- Parameters:
type- the interfaceClass- Returns:
- this object
-
removeInterface
Removes the specified interface- Parameters:
type- the interfaceJavaInterface- Returns:
- this object
-