public IMethodInfo getMethodInfo() { return _genericFuncType.getMethodInfo(); }
public IMethodInfo getMethodInfo() { return _genericFuncType.getMethodInfo(); }
@Override public IExpression[] getDefaultValueExpressions() { if( getMethodInfo() instanceof IOptionalParamCapable ) { return ((IOptionalParamCapable)getMethodInfo()).getDefaultValueExpressions(); } return IExpression.EMPTY_ARRAY; }
public IType getReturnType() { if( _retType != null ) { return _retType; } IGenericMethodInfo gmi = (IGenericMethodInfo)_genericFuncType.getMethodInfo(); gmi = gmi == null ? _genericFuncType : gmi; return _retType = gmi.getParameterizedReturnType( _typeParams ); }
public IType getReturnType() { if( _retType != null ) { return _retType; } IGenericMethodInfo gmi = (IGenericMethodInfo)_genericFuncType.getMethodInfo(); gmi = gmi == null ? _genericFuncType : gmi; return _retType = gmi.getParameterizedReturnType( _typeParams ); }
public IType getEnclosingType() { if( _scriptPart instanceof IType) { return (IType)_scriptPart; } final IMethodInfo methodInfo = getMethodInfo(); if( methodInfo != null ) { return methodInfo.getOwnersType(); } return null; }
private boolean isDynamicMethod( List<? extends IInvocableType> listFunctionTypes ) { if( listFunctionTypes == null || listFunctionTypes.isEmpty() ) { return false; } IInvocableType invoType = listFunctionTypes.get( 0 ); if( invoType instanceof FunctionType ) { IMethodInfo mi = ((FunctionType)invoType).getMethodInfo(); if( mi != null && mi.getOwnersType() instanceof IPlaceholder ) { return true; } } return false; }
private boolean isDynamicMethod( List<? extends IInvocableType> listFunctionTypes ) { if( listFunctionTypes == null || listFunctionTypes.isEmpty() ) { return false; } IInvocableType invoType = listFunctionTypes.get( 0 ); if( invoType instanceof FunctionType ) { IMethodInfo mi = ((FunctionType)invoType).getMethodInfo(); if( mi != null && (mi.getOwnersType() instanceof IPlaceholder || mi instanceof DynamicMethodInfo) ) { return true; } } return false; }
private IType useDynamicTypeIfDynamicRoot( IInvocableType funcType, IType ctxType ) { if( funcType instanceof FunctionType && ((FunctionType)funcType).getMethodInfo() != null ) { IMethodInfo mi = ((FunctionType)funcType).getMethodInfo(); if( mi.getOwnersType().isDynamic() ) { ctxType = ((FunctionType)funcType).getReturnType(); } } return ctxType; }
public IType[] getParameterTypes() { if( _paramTypes != null ) { return _paramTypes; } IGenericMethodInfo gmi = (gw.lang.reflect.IGenericMethodInfo)_genericFuncType.getMethodInfo(); gmi = gmi == null ? _genericFuncType : gmi; return _paramTypes = gmi.getParameterizedParameterTypes2( _genericFuncType.getOwningParameterizedType(), _typeParams ); }
public IType[] getParameterTypes() { if( _paramTypes != null ) { return _paramTypes; } IGenericMethodInfo gmi = (gw.lang.reflect.IGenericMethodInfo)_genericFuncType.getMethodInfo(); gmi = gmi == null ? _genericFuncType : gmi; return _paramTypes = gmi.getParameterizedParameterTypes2( _genericFuncType.getOwningParameterizedType(), _typeParams ); }
private MethodScore makeDynamicMethodScore( List<? extends IInvocableType> listFunctionTypes, List<Expression> argExpressions ) { MethodScore score = new MethodScore(); score.setValid( true ); //noinspection unchecked score.setArguments( (List)argExpressions ); IMethodInfo mi = ((FunctionType)listFunctionTypes.get( 0 )).getMethodInfo(); mi = ((ITypeInfo)mi.getContainer()).getMethod( mi.getName(), getTypes( argExpressions ).toArray( new IType[argExpressions.size()] ) ); score.setInferredFunctionType( new FunctionType( mi ) ); score.setRawFunctionType( score.getInferredFunctionType() ); score.setScore( 1 ); return score; }
public IFeatureInfo getMethodOrConstructorInfo() { IMethodInfo mi = getMethodInfo(); if( mi == null ) { if( getScriptPart() != null ) { IType type = getScriptPart().getContainingType(); if( type instanceof IGosuClass && type.getRelativeName().equals( getName() ) ) { IGosuClass gsClass = (IGosuClass)type; return gsClass.getTypeInfo().getConstructor( type, getParameterTypes() ); } } } return mi; }
public IFeatureInfo getMethodOrConstructorInfo() { IMethodInfo mi = getMethodInfo(); if( mi == null ) { if( getScriptPart() != null ) { IType type = getScriptPart().getContainingType(); if( type instanceof IGosuClass && type.getRelativeName().equals( getName() ) ) { IGosuClass gsClass = (IGosuClass)type; return gsClass.getTypeInfo().getConstructor( type, getParameterTypes() ); } } } return mi; }
private MethodScore makeDynamicMethodScore( List<? extends IInvocableType> listFunctionTypes, List<Expression> argExpressions ) { MethodScore score = new MethodScore( IRelativeTypeInfo.Accessibility.NONE, getGosuClass() ); score.setValid( true ); //noinspection unchecked score.setArguments( (List)argExpressions ); IMethodInfo mi = ((FunctionType)listFunctionTypes.get( 0 )).getMethodInfo(); mi = ((ITypeInfo)mi.getContainer()).getMethod( mi.getName(), getParamTypes( argExpressions ) ); score.setInferredFunctionType( new FunctionType( mi ) ); score.setRawFunctionType( score.getInferredFunctionType() ); score.setScore( 1 ); return score; }
if( argTypes.length > 0 ) if( getMethodInfo() == null ) map = ((IGenericMethodInfo)getMethodInfo()).inferTypeParametersFromArgumentTypes2( _owningParameterizedType, argTypes );
if( argTypes.length > 0 ) if( getMethodInfo() == null ) map = ((IGenericMethodInfo)getMethodInfo()).inferTypeParametersFromArgumentTypes2( _owningParameterizedType, argTypes );
fle.setBoundFeature( ((FunctionType)funcType).getMethodInfo(), score.getArguments() );