@Override
    public final AnnotatedElement getAnnotatedElement() {
        if (annotatedElement == null) {
            if (metadata.getPathType() == PathType.PROPERTY) {
                Class<?> beanClass = metadata.getParent().getType();
                String propertyName = metadata.getName();
                annotatedElement = ReflectionUtils.getAnnotatedElement(beanClass, propertyName, getType());

            } else {
                annotatedElement = getType();
            }
        }
        return annotatedElement;
    }
{@code PathImpl} defines a default implementation of the {@link Path} interface

@author tiwe

@param <T>
querydsl-core/src/main/java/com/querydsl/core/types/PathImpl.java