Package com.sun.codemodel
Class JGenerifiableImpl
- java.lang.Object
-
- com.sun.codemodel.JGenerifiableImpl
-
- All Implemented Interfaces:
JDeclaration
,JGenerifiable
- Direct Known Subclasses:
JMethod
abstract class JGenerifiableImpl extends java.lang.Object implements JGenerifiable, JDeclaration
Implementation ofJGenerifiable
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<JTypeVar>
typeVariables
Lazily created list ofJTypeVar
s.
-
Constructor Summary
Constructors Constructor Description JGenerifiableImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
declare(JFormatter f)
JTypeVar
generify(java.lang.String name)
Adds a new type variable to this declaration.JTypeVar
generify(java.lang.String name, JClass bound)
Adds a new type variable to this declaration with a bound.JTypeVar
generify(java.lang.String name, java.lang.Class<?> bound)
Adds a new type variable to this declaration with a bound.protected abstract JCodeModel
owner()
JTypeVar[]
typeParams()
Iterates all the type parameters of this class/interface.
-
-
-
Method Detail
-
owner
protected abstract JCodeModel owner()
-
declare
public void declare(JFormatter f)
- Specified by:
declare
in interfaceJDeclaration
-
generify
public JTypeVar generify(java.lang.String name)
Description copied from interface:JGenerifiable
Adds a new type variable to this declaration.- Specified by:
generify
in interfaceJGenerifiable
-
generify
public JTypeVar generify(java.lang.String name, java.lang.Class<?> bound)
Description copied from interface:JGenerifiable
Adds a new type variable to this declaration with a bound.- Specified by:
generify
in interfaceJGenerifiable
-
generify
public JTypeVar generify(java.lang.String name, JClass bound)
Description copied from interface:JGenerifiable
Adds a new type variable to this declaration with a bound.- Specified by:
generify
in interfaceJGenerifiable
-
typeParams
public JTypeVar[] typeParams()
Description copied from interface:JGenerifiable
Iterates all the type parameters of this class/interface.- Specified by:
typeParams
in interfaceJGenerifiable
-
-