• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
EOEnterpriseObjectClazz with interface
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EOEnterpriseObjectClazz with interface


  • Subject: EOEnterpriseObjectClazz with interface
  • From: "Morris, Mark" <email@hidden>
  • Date: Mon, 19 Nov 2018 05:31:06 +0000
  • Thread-topic: EOEnterpriseObjectClazz with interface

Hi all,

I ran into a simple case where a good old ObjC protocol would have worked fine,
but Java provides only frustration. 😉

I wanted to require that a class that decides to implement a particular
interface should as part of that interface implement a certain static method.
No go in Java.

The implementing classes will always be subclasses of ERXGenericRecord, and a
little searching uncovered the promising EOEnterpriseObjectsClazz approach.
Right at the top it says:

In Java, static methods are similar to class methods in Objective-C, but one
cannot use static methods in interfaces and static methods cannot be overridden
by a subclass. Using the clazz pattern removes those limitations.

However, I didn’t see any examples of this use, and spent a little time but
couldn’t figure it out. Are there any examples out there?

Thanks!
Mark
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: EOEnterpriseObjectClazz with interface
      • From: Johann Werner <email@hidden>
  • Prev by Date: Re: WOlips Installation problem
  • Next by Date: Re: EOEnterpriseObjectClazz with interface
  • Previous by thread: Re: Consolidation of ERXMigrations
  • Next by thread: Re: EOEnterpriseObjectClazz with interface
  • Index(es):
    • Date
    • Thread