java.lang.SuppressWarnings Java Examples

The following examples show how to use java.lang.SuppressWarnings. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HeroDetailQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeString($responseFields[1], name);
      writer.writeList($responseFields[2], friends.isPresent() ? friends.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Friend1) item).marshaller());
          }
        }
      });
      writer.writeDouble($responseFields[3], height.isPresent() ? height.get() : null);
    }
  };
}
 
Example #2
Source File: TestQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeString($responseFields[1], name);
      writer.writeList($responseFields[2], friends.isPresent() ? friends.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Friend1) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #3
Source File: HeroDetails.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeInt($responseFields[1], totalCount.isPresent() ? totalCount.get() : null);
      writer.writeList($responseFields[2], edges.isPresent() ? edges.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge2) item).marshaller());
          }
        }
      });
      writer.writeObject($responseFields[3], pageInfo.marshaller());
      writer.writeBoolean($responseFields[4], isEmpty);
    }
  };
}
 
Example #4
Source File: TestQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeList($responseFields[1], links, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeCustom(CustomType.URL, item);
          }
        }
      });
    }
  };
}
 
Example #5
Source File: TestQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeString($responseFields[1], name);
      writer.writeList($responseFields[2], appearsIn, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeString(((Episode) item).rawValue());
          }
        }
      });
      writer.writeString($responseFields[3], firstAppearsIn.rawValue());
    }
  };
}
 
Example #6
Source File: TestQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeList($responseFields[1], appearsIn, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeString(((Episode) item).rawValue());
          }
        }
      });
    }
  };
}
 
Example #7
Source File: TestQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeInt($responseFields[1], totalCount.isPresent() ? totalCount.get() : null);
      writer.writeList($responseFields[2], edges.isPresent() ? edges.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #8
Source File: HeroDetailsQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeInt($responseFields[1], totalCount.isPresent() ? totalCount.get() : null);
      writer.writeList($responseFields[2], edges.isPresent() ? edges.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #9
Source File: HeroDetails.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeInt($responseFields[1], totalCount.isPresent() ? totalCount.get() : null);
      writer.writeList($responseFields[2], edges.isPresent() ? edges.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #10
Source File: TestQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeList($responseFields[0], search.isPresent() ? search.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Search) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #11
Source File: TestQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeList($responseFields[1], edges.isPresent() ? edges.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #12
Source File: StarshipFragment.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeList($responseFields[1], edges.isPresent() ? edges.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #13
Source File: HeroDetails.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeInt($responseFields[1], totalCount.isPresent() ? totalCount.get() : null);
      writer.writeList($responseFields[2], edges.isPresent() ? edges.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #14
Source File: HeroDetails.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeInt($responseFields[1], totalCount.isPresent() ? totalCount.get() : null);
      writer.writeList($responseFields[2], edges.isPresent() ? edges.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge1) item).marshaller());
          }
        }
      });
      writer.writeObject($responseFields[3], pageInfo.marshaller());
      writer.writeBoolean($responseFields[4], isEmpty);
    }
  };
}
 
Example #15
Source File: HeroDetails.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeInt($responseFields[1], totalCount.isPresent() ? totalCount.get() : null);
      writer.writeList($responseFields[2], edges.isPresent() ? edges.get() : null, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #16
Source File: TestQuery.java    From apollo-android with MIT License 6 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeInt($responseFields[1], totalCount);
      writer.writeList($responseFields[2], edges, new ResponseWriter.ListWriter() {
        @Override
        public void write(List items, ResponseWriter.ListItemWriter listItemWriter) {
          for (Object item : items) {
            listItemWriter.writeObject(((Edge) item).marshaller());
          }
        }
      });
    }
  };
}
 
Example #17
Source File: TestQuery.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeObject($responseFields[0], hero.isPresent() ? hero.get().marshaller() : null);
    }
  };
}
 
Example #18
Source File: TestQuery.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeString($responseFields[1], name.isPresent() ? name.get() : null);
    }
  };
}
 
Example #19
Source File: HeroDetails.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeString($responseFields[1], name);
    }
  };
}
 
Example #20
Source File: HeroDetails.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeString($responseFields[1], name);
    }
  };
}
 
Example #21
Source File: TestQuery.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeObject($responseFields[0], hero.isPresent() ? hero.get().marshaller() : null);
    }
  };
}
 
Example #22
Source File: TestQuery.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
    }
  };
}
 
Example #23
Source File: TestQuery.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeObject($responseFields[0], starship.isPresent() ? starship.get().marshaller() : null);
    }
  };
}
 
Example #24
Source File: TestQuery.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeString($responseFields[1], name);
    }
  };
}
 
Example #25
Source File: HeroDetails.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeObject($responseFields[1], node.isPresent() ? node.get().marshaller() : null);
    }
  };
}
 
Example #26
Source File: HeroDetailQuery.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      fragments.marshaller().marshal(writer);
    }
  };
}
 
Example #27
Source File: HeroDetails.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeObject($responseFields[1], node.isPresent() ? node.get().marshaller() : null);
    }
  };
}
 
Example #28
Source File: TestQuery.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      fragments.marshaller().marshal(writer);
    }
  };
}
 
Example #29
Source File: HeroDetails.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeString($responseFields[0], __typename);
      writer.writeString($responseFields[1], name);
      writer.writeObject($responseFields[2], friendsConnection.marshaller());
    }
  };
}
 
Example #30
Source File: HeroDetailQuery.java    From apollo-android with MIT License 5 votes vote down vote up
@SuppressWarnings({"rawtypes", "unchecked"})
public ResponseFieldMarshaller marshaller() {
  return new ResponseFieldMarshaller() {
    @Override
    public void marshal(ResponseWriter writer) {
      writer.writeObject($responseFields[0], heroDetailQuery.isPresent() ? heroDetailQuery.get().marshaller() : null);
    }
  };
}