Skip to content
Permalink
Browse files

Fix JIProlog implementation of the `java/2::invoke/2` predicate

  • Loading branch information...
pmoura committed Jun 11, 2019
1 parent 9dfe75a commit fba03d20a7b501331577b32ce6561dc572016596
Showing with 7 additions and 5 deletions.
  1. +2 −0 RELEASE_NOTES.md
  2. +5 −5 library/java/java_jip.lgt
@@ -144,6 +144,8 @@ results when calling `char_code/2` with a code of zero.

* FIXED: Workaround B-Prolog atom size limitation in the `arbitrary` library.

* FIXED: JIProlog implementation of the `java/2::invoke/2` predicate.

Tools
-----

@@ -22,9 +22,9 @@
implements((forwarding, java_access_protocol))).

:- info([
version is 1.1,
version is 1.2,
author is 'Paulo Moura',
date is 2018/05/23,
date is 2019/06/11,
comment is 'Minimal abstraction for calling Java from Logtalk using familiar message sending syntax with JIProlog.',
parnames is ['Reference', 'ReturnValue']
]).
@@ -41,17 +41,16 @@
parameter(1, Reference),
set(Reference, Field, Value).

new(Parameters, Instance) :-
new(Parameters, Instance) :-
parameter(1, Class),
length(Parameters, Arity),
functor(Proto, Class, Arity),
get_constructors(Class, Constructors),
memberchk(Proto, Constructors),
% writeq(create_object(Proto, Parameters, Instance)), nl,
create_object(Proto, Parameters, Instance),
parameter(2, Instance).

new(Instance) :-
new(Instance) :-
new([], Instance).

invoke(Message) :-
@@ -66,6 +65,7 @@

invoke(Functor, Parameters) :-
parameter(1, Reference),
Message =.. [Functor| Parameters],
functor(Message, Functor, Arity),
functor(Proto, Functor, Arity),
get_methods(Reference, Methods),

0 comments on commit fba03d2

Please sign in to comment.
You can’t perform that action at this time.