@Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PrimitiveType)) { return false; } PrimitiveType that = (PrimitiveType) o; return super.equals(o) && primitive == that.primitive; }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (!super.equals(o)) { return false; } TypeVariable that = (TypeVariable) o; return name.equals(that.name) && Arrays.equals(bounds, that.bounds); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ClassValue that = (ClassValue) o; return super.equals(o) && type.equals(that.type); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } FieldInternal that = (FieldInternal) o; if (flags != that.flags) { return false; } if (!Arrays.equals(annotations, that.annotations)) { return false; } if (!Arrays.equals(name, that.name)) { return false; } if (!type.equals(that.type)) { return false; } return true; }
/** * @param i * @return * @throws SerianalyzerException */ static String makeSignature ( MethodInfo i, boolean fix ) throws SerianalyzerException { StringBuilder sb = new StringBuilder(); sb.append('('); ClassInfo declaringImpl = i.declaringClass(); if ( fix && "<init>".equals(i.name()) && declaringImpl.nestingType() == NestingType.INNER ) { //$NON-NLS-1$ // there seems to be some sort of bug, missing the the outer instance parameter in the constructor if ( !Modifier.isStatic(declaringImpl.flags()) ) { org.jboss.jandex.Type enclosingClass = org.jboss.jandex.Type.create(declaringImpl.enclosingClass(), Kind.CLASS); org.jboss.jandex.Type firstArg = i.parameters().size() > 0 ? i.parameters().get(0) : null; if ( firstArg instanceof TypeVariable ) { firstArg = firstArg.asTypeVariable().bounds().get(0); } if ( firstArg == null || !firstArg.equals(enclosingClass) ) { sb.append(toString(enclosingClass)); } } } for ( org.jboss.jandex.Type p : i.parameters() ) { sb.append(toString(p)); } sb.append(')'); sb.append(toString(i.returnType())); return sb.toString(); }