private TypeMirror getTypeMirrorOf(final Declaration decl) {
        TypeMirror typeMirror = null;
        if (decl instanceof FieldDeclaration) {
            typeMirror = ((FieldDeclaration) decl).getType();
        }
        if (decl instanceof ParameterDeclaration) {
            typeMirror = ((ParameterDeclaration) decl).getType();
        }
        if (decl instanceof MethodDeclaration) {
            typeMirror = ((MethodDeclaration) decl).getReturnType();
        }
        return typeMirror;
    }