code: public static ManagementMethod getInstance(String methodName,
                                                 JournalEntry parent) {
          if (METHOD_INGEST.equals(methodName)) {
              return new IngestMethod(parent);
          } else if (METHOD_MODIFY_OBJECT.equals(methodName)) {
              return new ModifyObjectMethod(parent);
          } else if (METHOD_PURGE_OBJECT.equals(methodName)) {
              return new PurgeObjectMethod(parent);
          } else if (METHOD_ADD_DATASTREAM.equals(methodName)) {
              return new AddDatastreamMethod(parent);
          } else if (METHOD_MODIFY_DATASTREAM_BY_REFERENCE.equals(methodName)) {
              return new ModifyDatastreamByReferenceMethod(parent);
          } else if (METHOD_MODIFY_DATASTREAM_BY_VALUE.equals(methodName)) {
              return new ModifyDatastreamByValueMethod(parent);
          } else if (METHOD_SET_DATASTREAM_STATE.equals(methodName)) {
              return new SetDatastreamStateMethod(parent);
          } else if (METHOD_SET_DATASTREAM_VERSIONABLE.equals(methodName)) {
              return new SetDatastreamVersionableMethod(parent);
          } else if (METHOD_PURGE_DATASTREAM.equals(methodName)) {
              return new PurgeDatastreamMethod(parent);
          } else if (METHOD_PURGE_RELATIONSHIP.equals(methodName)) {
              return new PurgeRelationshipMethod(parent);
          } else if (METHOD_PUT_TEMP_STREAM.equals(methodName)) {
              return new PutTempStreamMethod(parent);
          } else if (METHOD_GET_NEXT_PID.equals(methodName)) {
              return new GetNextPidMethod(parent);
          } else if (METHOD_ADD_RELATIONSHIP.equals(methodName)) {
              return new AddRelationshipMethod(parent);
          } else {
              throw new IllegalArgumentException("Unrecognized method name: '"
                      + methodName + "'");
          }
      }
docs: Get an instance of the proper class, based on the method name.