class PermissionFactory {

   public static Permission createPermission(String permission) {
      if(InstancePermission.isInstancePermission(permission)) {
         return new InstancePermission(permission);
      }
      return new WildcardPermission(permission);
   }

   private  PermissionFactory();

}