What are the names of the class names hosting the delegate?

I have the following abstract class.

abstract class AbstractSome implements Interface1, Interface2 {
    // all methods defined in Interface1 is implemented
}

Now I want to extend this class using the delegate that implements Interface2.

class ????Some extends AbstractSome {

    public ????Some(final Interface2 delegate) {
        this.delegate = delegate;
    }

    @Override // defined in Interface2
    public void doSomething() {
        delegate.doSomething();
    }

    private final Interface2 delegate;
}

Is there any good naming-conventionfor this encompassing class?

Is it Delegating...or is it Default...good?

+4
source share
1 answer

The design you use is so close to the adapter template , so I think that would be a good approach to use for the class name. for example SomeAdapdterorSomeDelegateAdapter

I think there is no naming convention for this particular situation

+1
source

Source: https://habr.com/ru/post/1620495/


All Articles