Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Declare Parent return an error must implement the inherited abstract method

Hi guys I test my aspect to see if the@Override
has some influence on my issue. But unfortunately
it doesn't work
do you know if the annotation @DeclareParents works with an contrete class
which implements interface?

Have you already this error message in aspectj
"...must implement the inherited abstract method...."

Thanks in advance


Patrice TRUONG VAN NGA a écrit :
Hi Simone thanks for your fast answer
XXXRender doesn't implement HeaderResourceProducer in java code.
But my aspect try to instrument this class in inter type way...
And After this I have an ajc error
then after I have an javac compiler error
with the same must implement the inherited abstract method.

It works with aspect in a same module than class to be weaved
but not working with class

Thanks in advance

Simone Gianni a écrit :
Hi Patrice,
is XXXRender declared as "XXXRender implements HeaderResourceProducer" in the java code, or is the HeaderResourceProducer itself introduced by the aspect on a class not suposed to implement it in first place?

I'm asking because in the first case, it may be that the aspect is not being weaved at all because of a Maven misconfiguration.

Simone

2010/4/14 Patrice TRUONG VAN NGA <patrice.truong-van-nga@xxxxxxxxxxxxxxxxxxx>
Hi all,
I am new to this mailing list.

I try to use this syntax
@Aspect
public class ResourceManagerAspect {
   
    public static class HeaderResourceProducerImpl implements HeaderResourceProducer {
       
        public LinkedHashSet getHeaderScripts(
                FacesContext context,
                UIComponent component) {
....
        }
       
        public LinkedHashSet getHeaderStyles(
                FacesContext context,
                UIComponent component) {
...
        }  
    }
   
    @DeclareParents(
            value="( @javax.faces.application.ResourceDependency * || @javax.faces.application.ResourceDependencies *)",
            defaultImpl=HeaderResourceProducerImpl.class)
    private HeaderResourceProducer membre;

}

My concern is that I have a project maven in multi-module.
when I weave classes from the module of this aspect it works

when I weave classes from another module this aspect does not work
I have this error ...

[ERROR] The type XXXRenderer must implement the inherited abstract method HeaderResourceProducer.getHeaderStyles(FacesContext, UIComponent)
whats wrong I think that weaving is done but not totally?
because it seems that the inter-type is affected to the XXXRenderer.




--
Patrice TRUONG VAN NGA
Département O2 (Forge et Orion)
tel : 05.61.28.94.91 / fax : 05.61.28.92.82

Ministère de l'Agriculture et de la Pêche
Secrétariat Général / Service de la modernisation / SDSI /
BMSQ (Bureau des Méthodes, du Support et de la Qualité)
BP 68 Castanet CEDEX

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



_______________________________________________ aspectj-users mailing list aspectj-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/aspectj-users


--
Patrice TRUONG VAN NGA
Département O2 (Forge et Orion)
tel : 05.61.28.94.91 / fax : 05.61.28.92.82

Ministère de l'Agriculture et de la Pêche
Secrétariat Général / Service de la modernisation / SDSI /
BMSQ (Bureau des Méthodes, du Support et de la Qualité)
BP 68 Castanet CEDEX

_______________________________________________ aspectj-users mailing list aspectj-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/aspectj-users


--
Patrice TRUONG VAN NGA
Département O2 (Forge et Orion)
tel : 05.61.28.94.91 / fax : 05.61.28.92.82

Ministère de l'Agriculture et de la Pêche
Secrétariat Général / Service de la modernisation / SDSI /
BMSQ (Bureau des Méthodes, du Support et de la Qualité)
BP 68 Castanet CEDEX

Back to the top