public IType getOwnersType() { return _delegate.getOwnersType(); }
public IType getOwnersType() { return _delegate.getOwnersType(); }
@Override public boolean couldHaveTypeVariables() { return _terminalMethod instanceof IGosuMethodInfo && !IGosuClass.ProxyUtil.isProxy(_terminalMethod.getOwnersType()); }
@Override public boolean couldHaveTypeVariables() { return _terminalMethod instanceof IGosuMethodInfo && !IGosuClass.ProxyUtil.isProxy(_terminalMethod.getOwnersType()); }
public IType getEnclosingType() { if( _scriptPart instanceof IType) { return (IType)_scriptPart; } final IMethodInfo methodInfo = getMethodInfo(); if( methodInfo != null ) { return methodInfo.getOwnersType(); } return null; }
@Override public List<IType> getFullArgTypes() { ArrayList<IType> argTypes = new ArrayList<IType>(); if (!_mi.isStatic()) { argTypes.add(_mi.getOwnersType()); } if( _boundValues == null ) { for (IParameterInfo iParameterInfo : _mi.getParameters()) { argTypes.add(iParameterInfo.getFeatureType()); } } return argTypes; }
@Override public List<IType> getFullArgTypes() { ArrayList<IType> argTypes = new ArrayList<IType>(); if (!_mi.isStatic()) { argTypes.add(_mi.getOwnersType()); } if( _boundValues == null ) { for (IParameterInfo iParameterInfo : _mi.getParameters()) { argTypes.add(iParameterInfo.getFeatureType()); } } return argTypes; }
@Override public IGenericTypeVariable[] getTypeVariables() { if (_terminalMethod instanceof IGosuMethodInfo && !IGosuClass.ProxyUtil.isProxy(_terminalMethod.getOwnersType())) { return ((IGosuMethodInfo) _terminalMethod).getTypeVariables(); } else { return null; } }
@Override public IGenericTypeVariable[] getTypeVariables() { if (_terminalMethod instanceof IGosuMethodInfo && !IGosuClass.ProxyUtil.isProxy(_terminalMethod.getOwnersType())) { return ((IGosuMethodInfo) _terminalMethod).getTypeVariables(); } else { return null; } }
private boolean implementsMethod( IType type, IMethodInfo mi ) { return StandardCoercionManager.isStructurallyAssignable_Laxed( mi.getOwnersType(), type, mi, new TypeVarToTypeMap() ); }
private IType extractReturnTypeFromInterface( IType target ) { for( IMethodInfo methodInfo : target.getTypeInfo().getMethods() ) { if( methodInfo.getOwnersType().equals( target ) ) { return methodInfo.getReturnType(); } } return null; }
public static boolean isTargetMethod(IType gosuProgram, IMethodInfo methodInfo) { return methodInfo.isPublic() && (methodInfo.hasAnnotation(TypeSystem.get(gw.vark.annotations.Target.class)) || (methodInfo.getParameters().length == 0 && methodInfo.getOwnersType().equals( gosuProgram ))); }
private static IRType getTrueOwningType( IMethodInfo mi ) { if( mi instanceof IJavaMethodInfo) { // We have to get the owner type from the method because it may be different from the owning type e.g., entity aspects see ContactGosuAspect.AllAdresses IJavaClassMethod m = ((IJavaMethodInfo)mi).getMethod(); if( m != null ) { return IRTypeResolver.getDescriptor( m.getEnclosingClass() ); } } return IRTypeResolver.getDescriptor( mi.getOwnersType() ); }
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 List<IRType> getMethodDescriptor( IMethodInfo mi ) { List<IRType> paramTypes = new ArrayList<IRType>(); IFunctionType functionType = null; if (mi instanceof IGosuMethodInfo && !IGosuClass.ProxyUtil.isProxy( mi.getOwnersType() )) { functionType = (IFunctionType) ((IGosuMethodInfo) mi).getDfs().getType(); } addImplicitParameters( getOwningIType(), functionType, isStatic(), paramTypes ); paramTypes.addAll( getBoundedParameterTypeDescriptors( mi ) ); return paramTypes; }
private static IRType getTrueOwningType( IMethodInfo mi ) { if( mi instanceof IJavaMethodInfo) { // We have to get the owner type from the method because it may be different from the owning type e.g., entity aspects see ContactGosuAspect.AllAdresses IJavaClassMethod m = ((IJavaMethodInfo)mi).getMethod(); if( m != null ) { return IRTypeResolver.getDescriptor( m.getEnclosingClass() ); } } return IRTypeResolver.getDescriptor( mi.getOwnersType() ); }
public List<IRType> getMethodDescriptor( IMethodInfo mi ) { List<IRType> paramTypes = new ArrayList<IRType>(); IFunctionType functionType = null; if (mi instanceof IGosuMethodInfo && !IGosuClass.ProxyUtil.isProxy( mi.getOwnersType() )) { functionType = (IFunctionType) ((IGosuMethodInfo) mi).getDfs().getType(); } addImplicitParameters( getOwningIType(), functionType, isStatic(), paramTypes ); paramTypes.addAll( getBoundedParameterTypeDescriptors( mi ) ); return paramTypes; }
@Override public IType newInstance( IType[] paramTypes, IType returnType ) { FunctionType functionType = new FunctionType(this._strFunctionName, returnType, paramTypes, cloneTypeVars() ); functionType._iModifiers = _iModifiers; if (getScriptPart() == null && _mi != null) { if (_mi instanceof MethodInfoDelegate) { functionType.setScriptPart(new ScriptPartId(((MethodInfoDelegate)_mi).getSource().getOwnersType(), null)); } else { functionType.setScriptPart(new ScriptPartId(_mi.getOwnersType(), null)); } } else { functionType.setScriptPart(getScriptPart()); } return functionType; }
public void setMethodDescriptor(IMethodInfo md) { _md = md; if (md != null) { IType type = JavaTypes.IGOSU_OBJECT(); if (_md.getOwnersType() == IGosuClassInternal.Util.getGosuClassFrom(type)) { _md = type.getTypeInfo().getMethod(_md.getDisplayName(), ((FunctionType) ((IGosuMethodInfo) _md).getDfs().getType()).getParameterTypes()); } } }
public void setMethodDescriptor(IMethodInfo md) { _md = md; if (md != null) { IType type = JavaTypes.IGOSU_OBJECT(); if (_md.getOwnersType() == IGosuClassInternal.Util.getGosuClassFrom(type)) { _md = type.getTypeInfo().getMethod(_md.getDisplayName(), ((FunctionType) ((IGosuMethodInfo) _md).getDfs().getType()).getParameterTypes()); } } }