code: public static TrashPolicy getInstance(Configuration conf, FileSystem fs, Path home)
        throws IOException {
      Class<? extends TrashPolicy> trashClass = conf.getClass("fs.trash.classname",
                                                        TrashPolicyDefault.class,
                                                        TrashPolicy.class);
      TrashPolicy trash = (TrashPolicy) ReflectionUtils.newInstance(trashClass, conf);
      trash.initialize(conf, fs, home); // initialize TrashPolicy
      return trash;
    }
docs: Get an instance of the configured TrashPolicy based on the value
  of the configuration paramater fs.trash.classname.
  
  @param conf the configuration to be used
  @param fs the file system to be used
  @param home the home directory
  @return an instance of TrashPolicy