Skip to content

Import custom class to .mop file #253

@wolganens

Description

@wolganens

In the HasNext example, the class Iterator is used to make the property. Is there a way to import a class from a custom package like in the code below:
`// Copyright (c) 2002-2014 JavaMOP Team. All Rights Reserved.
package mop;
import CoffeeMachineModel.CoffeeMachine;

import java.io.;
import java.util.
;

// This property requires that hasnext be called before next
// and that hasnext return true. It is a modification of the
// HasNext property from tracematches
// (see ECOOP'07 http://abc.comlab.ox.ac.uk/papers),
// with the modification requiring hasnext to return true

CheckDispenseCoffee(CoffeeMachine i) {

event dispense_coffe before(CoffeeMachine i) :
call(* CoffeeMachine.dispense_coffe())
&& target(i) { System.out.println("chamou dispense_coffe"); }

......
......

}`
I would like to check if the dispense_coffe() method was called on a CoffeeMachine Object.

Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions