Menu

#11 casting problems with nested classes

open
nobody
None
5
2004-04-29
2004-04-29
No

A runtime error is shown in the following case:

1) filling a vector with nested classes of a binding
class. These nested classes are based on a nested
interface in a collaboration interface.

2) using this vector as parameter for a method in the
corresponding providing class

3) in this method trying to cast an element of the
vector to the type of the nested interface.

In 3 the error is shown:

java.lang.RuntimeException: cast to given family not
possible
at
org.caesarj.runtime.CastImpl.checkFamily(CastImpl.java:8)
at
graphcoloring.SimpleColoring_Impl._computeColoring_implementation(SimpleColoring.java:22)
at
graphcoloring.SimpleColoring_Impl._computeColoring_selfContext(SimpleColoring.java:16)
at
graphcollaboration.ColoredGraph_Proxy._computeColoring_selfContext(ColoredGraph.java:14)
at
graphcollaboration.ColoredGraph_Proxy._computeColoring_selfContext(ColoredGraph.java:14)
at
graphcollaboration.ColoredGraph_Proxy.computeColoring(ColoredGraph.java:14)
at main.UniversityManager.main(UniversityManager.java:156)

Discussion


Log in to post a comment.

MongoDB Logo MongoDB