Package org.pkl.core
Class TypeParameter
- java.lang.Object
-
- org.pkl.core.TypeParameter
-
- All Implemented Interfaces:
java.io.Serializable
public final class TypeParameter extends java.lang.Object implements java.io.SerializableA type parameter of a generic class, type alias, or method.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypeParameter.VarianceThe variance of a type parameter.
-
Constructor Summary
Constructors Constructor Description TypeParameter(TypeParameter.Variance variance, java.lang.String name, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetIndex()Returns the index of this type parameter in its owner's type parameter list, starting from zero.java.lang.StringgetName()Returns the name of this type parameter.MembergetOwner()Returns the generic class, type alias, or method that this type parameter belongs to.TypeParameter.VariancegetVariance()Returns the variance of this type parameter.voidinitOwner(Member owner)Initializes the generic class, type alias, or method that this type parameter belongs to.
-
-
-
Constructor Detail
-
TypeParameter
public TypeParameter(TypeParameter.Variance variance, java.lang.String name, int index)
-
-
Method Detail
-
initOwner
public void initOwner(Member owner)
Initializes the generic class, type alias, or method that this type parameter belongs to. This method must be called as part of initializing this object. It is kept separate from the constructor to help clients avoid circular evaluation.
-
getOwner
public Member getOwner()
Returns the generic class, type alias, or method that this type parameter belongs to.
-
getVariance
public TypeParameter.Variance getVariance()
Returns the variance of this type parameter.
-
getName
public java.lang.String getName()
Returns the name of this type parameter.
-
getIndex
public int getIndex()
Returns the index of this type parameter in its owner's type parameter list, starting from zero.
-
-