Subject: | |
From: | |
Reply To: | |
Date: | Thu, 20 Oct 2016 14:36:43 -0200 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Dear all,
In my application, I have extended Evolve class (here called
MyEvolve.java). In this class, I need to instantiate an object from
another class created by my (let's say MyClass obj = new MyClass()).
However, I need to use this object in the evaluate method (implemented
in my problem).
How could I pass this object from MyEvolve (extending Evolve.java) to
MyProblem (public class myProblem extends Problem implements
SimpleProblemForm)? This object can not be static, that's why I need
to pass as a parameter. However, ECJ will call the evaluate
implemented according to SimpleProblemForm (exactly the same
parameters). Then, I need to know where ECJ calls evaluate(), then I
can change it to call a different evaluate (with an additional param),
and add a new evaluate method in SimpleProblemForm (one more
parameter: MyClass obj) or implement a new interface (that also
implements SimpleProblemForm).
Could someone give me directions to solve this, please?
Best,
Márcio
--------
Prof. Dr. Márcio Porto Basgalupp
Instituto de Ciência e Tecnologia (ICT)
Universidade Federal de São Paulo (UNIFESP)
Tel: +55 12 3924-9500 (r: 9762)
|
|
|