Package gw.lang.reflect
Interface IGenericMethodInfo
- All Known Subinterfaces:
IBlockType
,IGosuConstructorInfo
,IGosuMethodInfo
,IGosuPropertyInfo
,IGosuVarPropertyInfo
,IJavaMethodInfo
- All Known Implementing Classes:
AbstractGenericMethodInfo
,BlockType
,DelegateFunctionType
,ErrorTypeInfo.UniversalFunctionType
,FunctionType
,GosuConstructorInfo
,GosuMethodInfo
,GosuPropertyInfo
,GosuVarPropertyInfo
,JavaMethodInfo
,MetaMethodInfoDelegate
,MetaTypeTypeInfo.DeprecatedStaticMethodInfoDelegate
,MetaTypeTypeInfo.StaticMethodInfoDelegate
,MethodInfoDelegate
,ParameterizedGosuConstructorInfo
,ParameterizedGosuPropertyInfo
public interface IGenericMethodInfo
-
Method Summary
Modifier and TypeMethodDescriptionIType[]
getParameterizedParameterTypes
(IType... typeParams) IType[]
getParameterizedParameterTypes2
(IType owningParameterizedType, IType[] typeParams) getParameterizedReturnType
(IType... typeParams) inferTypeParametersFromArgumentTypes
(IType... argTypes) inferTypeParametersFromArgumentTypes2
(IType owningParameterizedType, IType... argTypes)
-
Method Details
-
getTypeVariables
IGenericTypeVariable[] getTypeVariables()- Returns:
- An array of generic type variables if this feature corresponds with a generic type.
-
getParameterizedReturnType
-
getParameterizedParameterTypes
-
getParameterizedParameterTypes2
-
inferTypeParametersFromArgumentTypes
- Parameters:
argTypes
- The argument types from a generic method call.- Returns:
- A map of inferred type parameters based on the argTypes. The map
contains only the types that could be inferred -- the map may be empty.
E.g.,
given generic method:
T[] toArray( T[] ) and call: list.toArray( new String[list.size()] ); => the toArray() method call should be automatically parameterized with based on the new String[0].
-
inferTypeParametersFromArgumentTypes2
TypeVarToTypeMap inferTypeParametersFromArgumentTypes2(IType owningParameterizedType, IType... argTypes)
-