Then you're stuck, and you're forced to resort to non-enforced
implementation.  I add an 'implements' attribute to the CFCOMPONENT tag.
It's ignored by CF, but you can view it in the component meta data.  If you
ever change your interface component, you can just do a search through all
your CFCs for that component name in the implements list and find all the
CFCs that need to be updated.

However, since your interface CFCs don't provide anything to the extending
class, not having them explicitly in the class hierarchy doesn't matter,
except for compile-time checking.  It's probably done at runtime with CF,
but it would be compile-time with Java.

Again, far from a perfect solution, but it works.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Davis, Eric
> Sent: Monday, October 27, 2003 11:27 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [CFCDev] Template Method Pattern question
>
>
> Barney,
>
> How do you deal with inheritance in a class with which you also require an
> interface?
>
> For example:
>  - class Student { }
>  - interface PaperGrader { }
>  - class Professor implements PaperGrader { }
>  - class TeacherAssistant extends Student implements PaperGrader { }
>
> This is where I get stuck. How can we make this possible with CFCs?
>

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to