public class ParameterizedFunctionType extends AbstractType implements IFunctionType
EMPTY_ARRAY, EMPTY_TYPE_ARRAY, EMPTY_TYPE_LIST| Constructor and Description |
|---|
ParameterizedFunctionType(FunctionType genericType,
IType... typeParams) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areParamsCompatible(IFunctionType rhsType) |
boolean |
equals(Object o) |
Set<IType> |
getAllTypesInHierarchy()
Returns a Set of all IIntrinsicTypes that this class is assignable from,
including this class.
|
Object |
getArrayComponent(Object array,
int iIndex)
Returns the value of the indexed component in the specified
array object.
|
int |
getArrayLength(Object array)
Returns the length of the specified array object.
|
IType |
getArrayType()
Make an array type from this type.
|
IType |
getComponentType()
If this is an array type, a type representing the component type of the
array.
|
Set<IType> |
getCompoundTypeComponents() |
IScriptPartId |
getContext() |
IExpression[] |
getDefaultValueExpressions() |
String |
getDisplayName()
The display name of this intrinsic type.
|
IType |
getEnclosingType()
Returns the type immediately enclosing this type.
|
IType |
getGenericType()
If this is a parameterized type, returns the generic type this type
parameterizes.
|
IGenericTypeVariable[] |
getGenericTypeVariables()
Returns an array of GenericTypeVariables declared with this Generic Type.
|
IType[] |
getInterfaces() |
IMethodInfo |
getMethodInfo()
An associated IMethodInfo.
|
IFeatureInfo |
getMethodOrConstructorInfo() |
int |
getModifiers()
Returns the modifiers for this type, encoded in an integer.
|
String |
getName()
The fully qualified name of this intrinsic type.
|
String |
getNamespace()
The namespace for this class.
|
ParameterizedFunctionType |
getParameterizedType(IType... paramTypes)
Assuming this intrinsic type is a Generic type, return the parameterized
type associated with the given list of type parameters.
|
String[] |
getParameterNames() |
IType[] |
getParameterTypes() |
String |
getParamSignature()
Formatted signature of the form "
|
String |
getParamSignatureForCurrentModule() |
String |
getRelativeName()
The relative or unqualified name.
|
IType |
getReturnType() |
IScriptPartId |
getScriptPart() |
IType |
getSupertype()
Returns the type representing the supertype of this type.
|
ITypeInfo |
getTypeInfo()
Get the type information for this intrinsic type.
|
ITypeLoader |
getTypeLoader()
Returns the type loader responsible for loading this intrinsic type.
|
IType[] |
getTypeParameters()
If this is a parameterized type, returns the specific types used to create
this type, null otherwies.
|
int |
hashCode() |
boolean |
hasOptionalParams() |
IFunctionType |
inferParameterizedTypeFromArgTypesAndContextType(IType[] eArgs,
IType ctxType) |
boolean |
isAbstract() |
boolean |
isArray()
True if this is an array.
|
boolean |
isAssignableFrom(IType type)
Determines if the type represented by this intrinsic type is either the
same as, or is a super-type of the type represented by the specified type
parameter.
|
boolean |
isAssignableFrom(IType type,
boolean bContravariant) |
boolean |
isCompoundType() |
boolean |
isDiscarded()
True if this type has been replaced with a newer version of the same name in the type system.
|
boolean |
isEnum()
Returns true if this type is an enumeration.
|
boolean |
isFinal()
True if this type cannot be extended.
|
boolean |
isGenericType()
Returns true if this ia a Generic Type.
|
boolean |
isInterface()
Returns true if this type is an interface.
|
boolean |
isMutable()
Are intances of this type mutable? Note sometimes it's difficult to
determine.
|
boolean |
isParameterizedType()
Returns true if this ia a Parameterized Type.
|
boolean |
isPrimitive()
True if this type represents a primitive type e.g., Java int, char, etc.
|
boolean |
isValid()
Defines this type if it is not yet fully defined.
|
Object |
makeArrayInstance(int iLength)
Construct an array instance of specified length.
|
IType |
newInstance(IType[] paramTypes,
IType returnType) |
Object |
readResolve()
IType requires this method be implemented to ensure IType
instances can be centrally defined and cached.
|
void |
setArrayComponent(Object array,
int iIndex,
Object value)
Sets the value of the indexed component in the specified array object.
|
void |
setContext(IScriptPartId partId) |
void |
setDiscarded(boolean bDiscarded) |
String |
toString() |
void |
unloadTypeInfo()
Unload or nullify any references to this IType's ITypeInfo.
|
getLiteralMetaType, getMetaType, getTheRefclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLiteralMetaType, getMetaType, getSourceFiles, isDynamicpublic ParameterizedFunctionType(FunctionType genericType, IType... typeParams)
public IType getReturnType()
getReturnType in interface IFunctionTypepublic IType[] getParameterTypes()
getParameterTypes in interface IFunctionTypegetParameterTypes in interface IInvocableTypepublic IMethodInfo getMethodInfo()
IFunctionTypegetMethodInfo in interface IFunctionTypepublic IFeatureInfo getMethodOrConstructorInfo()
getMethodOrConstructorInfo in interface IFunctionTypepublic String getParamSignature()
IFunctionTypegetParamSignature in interface IFunctionTypegetParamSignature in interface IInvocableTypepublic String getParamSignatureForCurrentModule()
getParamSignatureForCurrentModule in interface IFunctionTypepublic String getName()
ITypepublic String getDisplayName()
ITypeIType.getName(), but in some cases a type may want to modify it's name
for presentation to the user.getDisplayName in interface ITypepublic String getRelativeName()
ITypegetRelativeName in interface ITypepublic String getNamespace()
ITypegetNamespace in interface ITypepublic ITypeLoader getTypeLoader()
ITypegetTypeLoader in interface ITypepublic boolean isInterface()
ITypeisInterface in interface ITypepublic IType[] getInterfaces()
getInterfaces in interface ITypepublic boolean isEnum()
ITypepublic IType getSupertype()
ITypegetSupertype in interface ITypepublic IType getEnclosingType()
ITypegetEnclosingType in interface ITypepublic IType getGenericType()
ITypegetGenericType in interface ITypepublic boolean isFinal()
ITypepublic boolean isParameterizedType()
ITypeisParameterizedType in interface ITypepublic boolean isGenericType()
ITypeisGenericType in interface ITypeIType.isParameterizedType()public IGenericTypeVariable[] getGenericTypeVariables()
ITypegetGenericTypeVariables in interface ITypepublic IFunctionType inferParameterizedTypeFromArgTypesAndContextType(IType[] eArgs, IType ctxType)
inferParameterizedTypeFromArgTypesAndContextType in interface IFunctionTypepublic ParameterizedFunctionType getParameterizedType(IType... paramTypes)
ITypegetParameterizedType in interface ITypeparamTypes - The type parameters.public IType[] getTypeParameters()
ITypegetTypeParameters in interface ITypepublic Set<IType> getAllTypesInHierarchy()
ITypegetAllTypesInHierarchy in interface ITypepublic boolean isArray()
ITypepublic boolean isPrimitive()
ITypeisPrimitive in interface ITypepublic IType getArrayType()
ITypegetArrayType in interface ITypepublic Object makeArrayInstance(int iLength)
ITypemakeArrayInstance in interface ITypepublic Object getArrayComponent(Object array, int iIndex) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ITypegetArrayComponent in interface ITypearray - An array instance of this intrinsic type.iIndex - The index of the component to get.IllegalArgumentException - If the specified object is not an array.ArrayIndexOutOfBoundsException - If the specified index argument
is negative, or if it is greater than or equal to the length of the
specified arraypublic void setArrayComponent(Object array, int iIndex, Object value) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ITypesetArrayComponent in interface ITypearray - An array instance of this intrinsic type.iIndex - The index of the component to set.value - The new value of the indexed component.IllegalArgumentException - If the specified object is not an array.ArrayIndexOutOfBoundsException - If the specified index argument
is negative, or if it is greater than or equal to the length of the
specified arraypublic int getArrayLength(Object array) throws IllegalArgumentException
ITypegetArrayLength in interface ITypearray - An array instance of this intrinsic type.IllegalArgumentException - If the object argument is not an array.public IType getComponentType()
ITypegetComponentType in interface ITypepublic boolean isAssignableFrom(IType type)
ITypeisAssignableFrom in interface ITypepublic boolean isAssignableFrom(IType type, boolean bContravariant)
isAssignableFrom in interface IFunctionTypepublic boolean isMutable()
ITypepublic ITypeInfo getTypeInfo()
ITypegetTypeInfo in interface ITypeITypeInfopublic void unloadTypeInfo()
ITypeunloadTypeInfo in interface ITypepublic Object readResolve() throws ObjectStreamException
ITypereadResolve in interface ITypeObjectStreamExceptionpublic boolean isValid()
ITypepublic int getModifiers()
ITypepublic, protected,
private, final, static,
abstract they should be decoded
using the methods of class Modifier.getModifiers in interface ITypeModifierpublic boolean isAbstract()
isAbstract in interface ITypepublic IScriptPartId getContext()
public void setContext(IScriptPartId partId)
public boolean areParamsCompatible(IFunctionType rhsType)
areParamsCompatible in interface IFunctionTypepublic IScriptPartId getScriptPart()
getScriptPart in interface IFunctionTypepublic IType newInstance(IType[] paramTypes, IType returnType)
newInstance in interface IFunctionTypepublic boolean isDiscarded()
ITypeisDiscarded in interface ITypepublic void setDiscarded(boolean bDiscarded)
setDiscarded in interface ITypepublic boolean isCompoundType()
isCompoundType in interface ITypepublic Set<IType> getCompoundTypeComponents()
getCompoundTypeComponents in interface ITypepublic String[] getParameterNames()
getParameterNames in interface IInvocableTypepublic IExpression[] getDefaultValueExpressions()
getDefaultValueExpressions in interface IInvocableTypepublic boolean hasOptionalParams()
hasOptionalParams in interface IInvocableTypeCopyright © 2019. All rights reserved.