Example #1
0
 private void specialHandlingFor_IGosuObject_BasedMethods(IFunctionSymbol symbol) {
   if (symbol.getType() instanceof IFunctionType) {
     IFunctionType ft = (IFunctionType) symbol.getType();
     if (ft.getScriptPart() != null
         && ft.getScriptPart().getContainingType()
             == IGosuClassInternal.Util.getGosuClassFrom(JavaTypes.IGOSU_OBJECT())) {
       _symbol =
           new GosuObjectFunctionSymbol(
               (IGosuClassInternal) ft.getScriptPart().getContainingType(),
               (DynamicFunctionSymbol) _symbol);
     }
   }
 }
  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());
      }
    }
  }