Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.weld.util.reflection;
 

Author(s):
Marko Luksa
Jozef Hartinger
 
public class GenericArrayTypeImpl implements GenericArrayType {
    private Type genericComponentType;
    public GenericArrayTypeImpl(Type genericComponentType) {
        this. = genericComponentType;
    }
    public GenericArrayTypeImpl(Class<?> rawTypeType... actualTypeArguments) {
        this. = new ParameterizedTypeImpl(rawTypeactualTypeArguments);
    }
    public Type getGenericComponentType() {
        return ;
    }
    @Override
    public int hashCode() {
        return (( == null) ? 0 : .hashCode());
    }
    @Override
    public boolean equals(Object obj) {
        if (obj instanceof GenericArrayType) {
            GenericArrayType that = (GenericArrayTypeobj;
            if ( == null) {
                return that.getGenericComponentType() == null;
            } else {
                return .equals(that.getGenericComponentType());
            }
        } else {
            return false;
        }
    }
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        if ( instanceof Class<?>) {
            sb.append(Reflections.<Class<?>>cast().getName());
        } else {
            sb.append(.toString());
        }
        sb.append("[]");
        return sb.toString();
    }
New to GrepCode? Check out our FAQ X