java.lang.Object
iu.type.TypeReference<T,R>
- Type Parameters:
T
- referent typeR
- referrer type
- All Implemented Interfaces:
IuTypeReference<T,
R>
Implementation of
IuTypeReference
.-
Constructor Summary
ConstructorsConstructorDescriptionTypeReference
(IuReferenceKind kind, R referrer, IuType<?, T> referent) Gets a non-named, non-indexed reference.TypeReference
(IuReferenceKind kind, R referrer, IuType<?, T> referent, int index) Gets a indexed reference.TypeReference
(IuReferenceKind kind, R referrer, IuType<?, T> referent, String name) Gets a named reference. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
int
index()
Gets the ordinal index associated with a parameter reference.kind()
Gets the reference kind.name()
Gets the name of the referent type as known by the referrer.referent()
Gets the referent type.referrer()
Gets the introspection facade for the element through which the reference was obtained.toString()
-
Constructor Details
-
TypeReference
TypeReference(IuReferenceKind kind, R referrer, IuType<?, T> referent) Gets a non-named, non-indexed reference.- Parameters:
kind
- non-named, non-indexed kindreferrer
- referrer elementreferent
- referent type
-
TypeReference
TypeReference(IuReferenceKind kind, R referrer, IuType<?, T> referent, String name) Gets a named reference.- Parameters:
kind
- named kindreferrer
- referrer elementreferent
- referent typename
- name
-
TypeReference
TypeReference(IuReferenceKind kind, R referrer, IuType<?, T> referent, int index) Gets a indexed reference.- Parameters:
kind
- indexed kindreferrer
- referrer elementreferent
- referent typeindex
- index
-
-
Method Details
-
kind
Description copied from interface:IuTypeReference
Gets the reference kind.- Specified by:
kind
in interfaceIuTypeReference<T,
R extends ElementBase> - Returns:
- reference kind
-
referrer
Description copied from interface:IuTypeReference
Gets the introspection facade for the element through which the reference was obtained.- Specified by:
referrer
in interfaceIuTypeReference<T,
R extends ElementBase> - Returns:
- introspection facade
-
referent
Description copied from interface:IuTypeReference
Gets the referent type.referent().reference() == this
must be true- Specified by:
referent
in interfaceIuTypeReference<T,
R extends ElementBase> - Returns:
- referent type
-
name
Description copied from interface:IuTypeReference
Gets the name of the referent type as known by the referrer.- Specified by:
name
in interfaceIuTypeReference<T,
R extends ElementBase> - Returns:
- reference name; must be non-null when
IuTypeReference.kind()
.isNamed()
is true, if false must be null.
-
index
public int index()Description copied from interface:IuTypeReference
Gets the ordinal index associated with a parameter reference.- Specified by:
index
in interfaceIuTypeReference<T,
R extends ElementBase> - Returns:
- index; must be >= 0 when
IuTypeReference.kind()
.isIndexed()
is true, if false must be -1.
-
hashCode
public int hashCode() -
equals
-
toString
-