Actions should not be Identifiable ?

Tom Zeller tzeller at dragonacea.biz
Mon Mar 24 22:13:24 EDT 2014


>>Not sure of the context, but I was leaning to a public method which may
>>throw an unchecked exception, to flatten the parent type hierarchy.
>
> I don't think getLogPrefix needs to be public.

I was being unclear, I was wanting setId() to be public.

The goal of what I have been unable to communicate would be a single
AbstractComponent class, further consolidating
AbstractInitializableComponent,
AbstractIdentifiedInitializableComponent, and
AbstractIdentifiableInitializableComponent.

>>Defaulting the ID to the default impl of toString() sounds ok to me.
>
> Most of the toString implementations are fairly nasty, they display every
> field of an object for debugging, so that probably won't work.

I was referring to Daniel's comment regarding getId(), and was
thinking of Object.toString(), i.e. :

 getClass().getName() + '@' + Integer.toHexString(hashCode())

>>Component.getId() then can be @nonnullafyerinit.
>
> I think the annotation's just wrong now.

Apologies for the phone auto-correct, meant @NonnullAfterInit.


More information about the dev mailing list