示例#1
0
 public ReadWriteGenerator getGenerator(ASTType type) {
   for (Map.Entry<Matcher<ASTType>, ReadWriteGenerator> generatorEntry : generators.entrySet()) {
     if (generatorEntry.getKey().matches(type)) {
       return generatorEntry.getValue();
     }
   }
   throw new ParcelerRuntimeException(
       "Unable to find appropriate Parcel method to write " + type.getName());
 }
示例#2
0
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof ASTType)) {
      return false;
    }

    ASTType that = (ASTType) o;

    return new EqualsBuilder().append(getName(), that.getName()).isEquals();
  }