0

My class have a field Map that references a functional interface.

public abstract class AbstractResourceAgent{

protected final Map<String, IInvokeOperation> resourceOperations;

}

then i extend that class and create and add anonymous intances of that IInvokeOperation to that Map like this:

public class AgentImplementation extends AbstractResourceAgent{

    @Override
    protected void describeResourceInvokeOperations() {

        setOperation("someName", (AgentOperationTarget agentOpTarget) -> {

            //do something...

        });

    }
}

Would that even show on a component diagram?

1 Answers1

0

You can make implementation details show on a component diagram by attaching a classifier with the <<use>> stereotype. This is from the spec (Superstructure v 2.4.1):

enter image description here

There's no reason that you couldn't put the base class in there too if you felt it was important to do so.

BobRodes
  • 5,990
  • 2
  • 24
  • 26