public boolean isRef() {
        try {
            init();
            for (int i = 0; i < segments.length; ++i) {
                Segment segment = segments[i];
                Class segmentType = segment.getClass();
                if (segmentType == ArrayAccessSegment.class
                        || segmentType == PropertySegment.class) {
                    continue;
                }
                return false;
            }
            return true;
        } catch (JSONPathException ex) {
            // skip
            return false;
        }
    }
@author wenshao[szujobs@hotmail.com]
@since 1.2.0
src/main/java/com/alibaba/fastjson/JSONPath.java