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()); }
@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(); }