title: Javassist - CannotCompileException: constructor/method declaration not found
body: <p>I've got the following class which i want to use in my generated code with Javassist.</p>
  
  <pre><code>public class SomeClass {
      private String someString;
      private Object someValue;
  
      public SomeClass() {}
  
      public SomeClass(String someString, Object someValue) {
          this.someString = someString;
          this.someValue = someValue;
      }
  
      public void setSomeValue(Object someValue) {
          this.someValue = someValue;
      }
  </code></pre>
  
  <p>In Javassist i analyse some classes and their fields and then try to instatiate my SomeClass-class. But i get the following error for each field which has another type then <code>java.lang.Object</code>.</p>
  
  <pre><code>javassist.CannotCompileException: [source error] setSomeValue(int) not found in com.test.SomeClass
  </code></pre>
  
  <p>and</p>
  
  <pre><code>javassist.CannotCompileException: [source error] setSomeValue(double) not found in com.test.SomeClass
  </code></pre>
  
  <p>and so on. The same happens when i try to use the constructor. </p>
  
  <p>Why this doesn't work?</p>
  
  <p>By the way, Javassist is used in conjunction with Android.</p>