Skip to content

Commit

Permalink
Updated for new ForgeProxy API
Browse files Browse the repository at this point in the history
  • Loading branch information
lincolnthree committed Jan 8, 2014
1 parent 63efbe4 commit 170c2c6
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ public Object invoke(Object self, Method thisMethod, Method proceed, Object[] ar
if (thisMethod.getDeclaringClass().getName().equals(ForgeProxy.class.getName()))
{
// Must call from "this." or method call is not properly processed by this class.
return this.getDelegate();
if (thisMethod.getName().equals("getDelegate"))
return this.getDelegate();
else if (thisMethod.getName().equals("getHandler"))
return this.getHandler();
}
}
catch (Exception e)
Expand Down Expand Up @@ -114,4 +117,10 @@ public Object getDelegate() throws Exception
return delegate;
}

@Override
public Object getHandler() throws Exception
{
return this;
}

}

0 comments on commit 170c2c6

Please sign in to comment.