code: public final void addMethod(final SgMethod method) {
          if (method == null) {
              throw new IllegalArgumentException("The argument 'method' cannot be null!");
          }
          if (method.getOwner() != this) {
              throw new IllegalArgumentException("The owner of 'method' is different from 'this'!");
          }
          if (!methods.contains(method)) {
              methods.add(method);
          }
      }
docs: Adds a method to the class. Does nothing if the method is already in the
  list of methods. You will never need to use this method in your code! A
  method is added automatically to the owning class when it's constructed!
  
  @param method
  Method to add - Cannot be null.