[openjava-support] Overzealous attempts to resolve types?
Status: Beta
Brought to you by:
tatsubori
|
From: Michael J. <msj...@uw...> - 2003-11-09 22:18:40
|
Hey all. Rather new to OpenJava, hope someone can give me some advice on this.
(OpenJava Compiler Version 1.1 build 20030618)
I am trying to write a metaclass to reproduce a method for a number of
primitive types. Unfortunately, in the case of method parameters, the types
are attempted to be resolved a bit too early, producing error messages both
in initializing the parse tree and during my translateDefinition. For the
latter, it appears for some strange reason that OJClass.removeMethod requires
the ability to resolve the method parameter's types? None of this is a
problem for the return type, which I suppose gets recognized as a keyword, or
is not checked as often?
In the end, it still generates the output correctly, but the errors are
annoying. The errors are shown below.
Is there a sane way in general to translate code where members/fields/
parameters/types are missing or invalid until after translateDefinition?
Cheers,
Michael Jarrett
University of Waterloo
Generating parse tree.
..done.
Initializing parse tree.
VariableBinder.bindName() openjava.mop.OJClassNotFoundException: typename :
typename
ClosedEnvironment
class object table : {}
binding table : {}
parent env : ClassEnvironment
class : blah
member classes : []
parent env : FileEnvironment
package : null
main class : blah
local classes :
imported classes :
imported packages : java.lang ca.uwaterloo.ece750.meta
local class table : {}
parent env : FileEnvironment
package : null
main class : blah
local classes :
imported classes :
imported packages : java.lang ca.uwaterloo.ece750.meta
local class table : {}
parent env : GlobalEnvironment
class object table : {char=char, long=long,
ca.uwaterloo.ece750.meta.PrimitiveTemplate=class ca.uw
aterloo.ece750.meta.PrimitiveTemplate, float=float, short=short, void=void,
int=int, blah=class bl
ah, java.lang.Object=class java.lang.Object, <type>null=<type>null,
double=double, java.lang.Strin
g=class java.lang.String, boolean=boolean, byte=byte}
..done.
Translating callee side
getTypename templated!
OJClass.forNameAnyway() failed for : typename
openjava.mop.OJClassNotFoundException: typename
ClassEnvironment
class : blah
member classes : []
parent env : FileEnvironment
package : null
main class : blah
local classes :
imported classes :
imported packages : java.lang ca.uwaterloo.ece750.meta
local class table : {}
parent env : GlobalEnvironment
class object table : {char=char, long=long,
ca.uwaterloo.ece750.meta.PrimitiveTemplate=class ca.uw
aterloo.ece750.meta.PrimitiveTemplate, float=float, short=short, void=void,
java.lang.System=class
java.lang.System, int=int, blah=class blah, java.lang.Object=class
java.lang.Object, java.lang.St
ring[]=class java.lang.String[], <type>null=<type>null, double=double,
java.lang.String=class java
.lang.String, boolean=boolean, byte=byte}
|