Interface GenericCapableSource<O extends JavaSource<O>,T>
- All Superinterfaces:
GenericCapable<O>
- All Known Subinterfaces:
JavaClassSource,JavaInterfaceSource,MethodSource<O>
Represents a Java source element that may define type variables.
- Author:
- mbenson
-
Method Summary
Modifier and TypeMethodDescriptionAdds a type variable.addTypeVariable(String name) Shortcut toNamedSource.setName(String)getTypeVariable(String name) Returns the namedTypeVariable.Returns all the generic types associated with this objectremoveTypeVariable(String name) Removes a type variable.removeTypeVariable(TypeVariable<?> typeVariable) Removes a type variable.Methods inherited from interface org.jboss.forge.roaster.model.GenericCapable
hasTypeVariable
-
Method Details
-
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
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
Shortcut toNamedSource.setName(String)- Parameters:
name-- Returns:
TypeVariableSource
-
removeTypeVariable
Removes a type variable.- Parameters:
name- should never be null- Returns:
- this
-
removeTypeVariable
Removes a type variable.- Parameters:
typeVariable- should never be null- Returns:
- this
-