Interface GenericCapableSource<O extends JavaSource<O>,T>
-
- All Superinterfaces:
GenericCapable<O>
- All Known Subinterfaces:
JavaClassSource,JavaInterfaceSource,MethodSource<O>
public interface GenericCapableSource<O extends JavaSource<O>,T> extends GenericCapable<O>
Represents a Java source element that may define type variables.- Author:
- mbenson
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TypeVariableSource<O>addTypeVariable()Adds a type variable.TypeVariableSource<O>addTypeVariable(String name)Shortcut toNamedSource.setName(String)TypeVariableSource<O>getTypeVariable(String name)Returns the namedTypeVariable.List<TypeVariableSource<O>>getTypeVariables()Returns all the generic types associated with this objectTremoveTypeVariable(String name)Removes a type variable.TremoveTypeVariable(TypeVariable<?> typeVariable)Removes a type variable.-
Methods inherited from interface org.jboss.forge.roaster.model.GenericCapable
hasTypeVariable
-
-
-
-
Method Detail
-
getTypeVariables
List<TypeVariableSource<O>> getTypeVariables()
Description copied from interface:GenericCapableReturns all the generic types associated with this object- Specified by:
getTypeVariablesin interfaceGenericCapable<O extends JavaSource<O>>
-
getTypeVariable
TypeVariableSource<O> getTypeVariable(String name)
Description copied from interface:GenericCapableReturns the namedTypeVariable.- Specified by:
getTypeVariablein interfaceGenericCapable<O extends JavaSource<O>>- Returns:
- TypeVariable or
null
-
addTypeVariable
TypeVariableSource<O> addTypeVariable()
Adds a type variable.- Returns:
TypeVariableSource
-
addTypeVariable
TypeVariableSource<O> addTypeVariable(String name)
Shortcut toNamedSource.setName(String)- Parameters:
name-- Returns:
TypeVariableSource
-
removeTypeVariable
T removeTypeVariable(String name)
Removes a type variable.- Parameters:
name- should never be null- Returns:
- this
-
removeTypeVariable
T removeTypeVariable(TypeVariable<?> typeVariable)
Removes a type variable.- Parameters:
typeVariable- should never be null- Returns:
- this
-
-