title: Is there any way of detecting if a method has been removed or a class has? Java
body: <p>Basically I need to know if someone has edited my code, so there is an authentication system which checks the users IP and if say someone were to decompile it and change it so that it didn't check for the IP they could leak my code.</p>
  
  <p>I have obfuscated it.</p>
  
  <p>But say they deleted the class which checked for IP and the method - could I check if they did this somewhere else in the program?</p>
  
  <p>For example, if I did <code>classInstance.methodName()</code> and the method didn't exist, would the program close? What would happen?</p>
  
  <blockquote>
    <p>Well actually, I'm pretty sure that there are some ways to achive protection by generating a hash code which takes your entire JAR-files into account. If you compute it and deliver it with your software (external file), then you have the chance to detect any changes. But you have to make sure that the "hacker" has no chance to simply replace the valid hash key by his own. This goes directly in the direction of encryption. You have to somehow secure your hash key that it's impossible to replace it without your knowledge... But I myself have no experience with this matter. Sorry. </p>
  </blockquote>
  
  <p>This was a response - how would I generate and actively use the has, if this is possible?</p>