0

I'm using JCodeModel for auto generating some code.

At some point, the code model seems to declare all of my String types as:

java.lang.String someFieldName;

I came across this problem a few times and solved it myself (one possible reason is declaring a field or a method argument that it's name is beginning with a capital letter) .

This time i don't see the reason.

Anyone know what possibly can cause the code model to declare it that way?

Thanks

Gumba
  • 275
  • 1
  • 3
  • 10

1 Answers1

0

You have to use the ref method. This should import the String class in the import section.

jCodeModel.ref(String.class) 
meleagros
  • 482
  • 1
  • 5
  • 17