/** * Adds package and type part of the element reference. * * @param buffer the buffer to append to. * @param ref the element in the report to reference. */ protected void constructFilePath(final StringBuilder buffer, final JavaElementRef ref) { addQualifiedType(buffer, ref); }
/** * Constructs a path to the specified Java element. * * @param baseLink the base link to prepend. * @param ref the element in the report to reference. * @return the path to the element or <code>null</code> if the referenced * element does not exit (only the existence of the file is checked, * not the element within the file). */ public String constructLink(final String baseLink, final JavaElementRef ref) { if (isReferencedReportExisting(ref)) { final StringBuilder buffer = new StringBuilder(64); buffer.append(baseLink); appendBasePathSeparator(buffer); addQualifiedType(buffer, ref); final MethodInfo memberName = ref.getElementName(); if (config.isReferenceMember() && memberName != null) { appendMemberPart(buffer, memberName); } return buffer.toString(); } return null; }