Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Compile error
Compile error [message #596277] Sun, 05 August 2007 07:06
Eike Stepper is currently offline Eike Stepper
Messages: 5522
Registered: July 2009
Senior Member
Hi,

I'm trying to make a method intertype dclaration for a subtype of
ArrayList<E> but I can't get it running.
I get a compiler excpetion:

java.lang.ClassCastException
at
org.aspectj.weaver.BoundedReferenceType.parameterize(Bounded ReferenceType.java:64)
at org.aspectj.weaver.ResolvedType.parameterize(ResolvedType.ja va:1884)
at
org.aspectj.weaver.ResolvedMemberImpl.parameterize(ResolvedM emberImpl.java:682)
at
org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(Reso lvedMemberImpl.java:644)
at
org.aspectj.weaver.NewMethodTypeMunger.parameterizedFor(NewM ethodTypeMunger.jav
....
Compile error: ClassCastException thrown:
org.aspectj.weaver.UnresolvedTypeVariableReferenceType cannot be cast to
org.aspectj.weaver.ReferenceType

for the following decl:

public boolean EcoreEList<T>.addAll(Collection<? extends T> collection)
{
return super.addAll(collection);
}

When I remove the <T> from the target type spec:

public boolean EcoreEList.addAll(Collection<? extends T> collection)
{
return super.addAll(collection);
}


the compiler doesn't say a word but at rntime when calling addAll(...)
on EcoreElist I get the following exception:

!ENTRY org.eclipse.ui 4 0 2007-08-04 20:28:28.625
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.VerifyError: (class: org/eclipse/emf/ecore/util/EcoreEList,
method: ajc$superDispatch$org_eclipse_emf_ecore_util_EcoreEList$addA ll
signature: (ILjava/util/Collection;)Z) Illegal use of nonvirtual
function call
at
org.eclipse.emf.ecore.impl.EPackageImpl.getEClassifiers(EPac kageImpl.java:394)
at
org.eclipse.emf.ecore.impl.EPackageImpl.createEClass(EPackag eImpl.java:721)
at
org.eclipse.emf.ecore.impl.EcorePackageImpl.createPackageCon tents(EcorePackageImpl.java:1923)
at
org.eclipse.emf.ecore.impl.EcorePackageImpl.init(EcorePackag eImpl.java:489)
at org.eclipse.emf.ecore.EcorePackage.<clinit>(EcorePackage.java:63)
at
org.eclipse.emf.internal.cdo.util.ModelUtil.addModelInfos(Mo delUtil.java:291)
at
org.eclipse.emf.internal.cdo.CDOSessionPackageManager.<init >(CDOSessionPackageManager.java:37)
at
org.eclipse.emf.internal.cdo.CDOSessionImpl.<init>(CDOSessionImpl.java:112)
at
org.eclipse.emf.internal.cdo.CDOSessionFactory.create(CDOSes sionFactory.java:38)
at
org.eclipse.emf.internal.cdo.CDOSessionFactory.create(CDOSes sionFactory.java:1)
at
org.eclipse.net4j.internal.util.container.ManagedContainer.c reateElement(ManagedContainer.java:394)
at
org.eclipse.net4j.internal.util.container.ManagedContainer.g etElement(ManagedContainer.java:248)
at
org.eclipse.emf.cdo.internal.ui.views.CDOSessionsView$OpenSe ssionAction.doRun(CDOSessionsView.java:89)
at org.eclipse.net4j.ui.actions.SafeAction.run(SafeAction.java: 50)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:545)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:443)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:153)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 504)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
at org.eclipse.equinox.launcher.Main.main(Main.java:1144)

I installed the AJDT from Europa update site.

Cheers
/Eike
Previous Topic:Programmatically weaving jars
Next Topic:Compile error
Goto Forum:
  


Current Time: Wed Sep 17 15:37:03 GMT 2014

Powered by FUDForum. Page generated in 0.11303 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software