I was looking at the definition of Spring's PlatformTransactionManager which contains references to TransactionStatus and TransactionDefinition, two other interfaces.
Is this acceptable in general, an interface's definition containing references to other interfaces? When is it useful?
Yes it's acceptable. Why wouldn't it be ?
It's even better to have references to Interfaces instead of concrete classes for what it worth.
It's absolutely acceptable. Sometimes types need to refer to other types - and if those types in turn represent potentially complex services, it's useful to be able to abstract out a general type, often in the form of an interface.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With