public void addMethod(SootMethod m){
  checkLevel(SIGNATURES);
  if (m.isDeclared())   throw new RuntimeException("already declared: " + m.getName());
  if (subSigToMethods.get(m.getNumberedSubSignature()) != null) {
    throw new RuntimeException("Attempting to add method " + m.getSubSignature() + " to class "+ this+ ", but the class already has a method with that signature.");
  }
  subSigToMethods.put(m.getNumberedSubSignature(),m);
  methodList.add(m);
  m.setDeclared(true);
  m.setDeclaringClass(this);
}

public void addMethod ( SootMethod m ) { checkLevel ( SIGNATURES ) ; if ( m . isDeclared ( ) ) throw new RuntimeException ( "already declared: " + m . getName ( ) ) ; if ( subSigToMethods . get ( m . getNumberedSubSignature ( ) ) != null ) { throw new RuntimeException ( "Attempting to add method " + m . getSubSignature ( ) + " to class " + this + ", but the class already has a method with that signature." ) ; } subSigToMethods . put ( m . getNumberedSubSignature ( ) , m ) ; methodList . add ( m ) ; m . setDeclared ( true ) ; m . setDeclaringClass ( this ) ; }
adds the given method to this class .
