public boolean isProtected() { return wrapped.isProtected(); }
/** * Return true if this class is linkable and false if we can't link to the * desired class. * <br> * <b>NOTE:</b> You can only link to external classes if they are public or * protected. * * @param classDoc the class to check. * @param configuration the current configuration of the doclet. * * @return true if this class is linkable and false if we can't link to the * desired class. */ public static boolean isLinkable(ClassDoc classDoc, Configuration configuration) { return ((classDoc.isIncluded() && configuration.isGeneratedDoc(classDoc))) || (configuration.extern.isExternal(classDoc) && (classDoc.isPublic() || classDoc.isProtected())); }
/** * Return true if this class is linkable and false if we can't link to the * desired class. * <br> * <b>NOTE:</b> You can only link to external classes if they are public or * protected. * * @param classDoc the class to check. * @param configuration the current configuration of the doclet. * * @return true if this class is linkable and false if we can't link to the * desired class. */ public static boolean isLinkable(ClassDoc classDoc, Configuration configuration) { return ((classDoc.isIncluded() && configuration.isGeneratedDoc(classDoc))) || (configuration.extern.isExternal(classDoc) && (classDoc.isPublic() || classDoc.isProtected())); }
/** * {@inheritDoc} */ public void writeConstantMembersHeader(ClassDoc cd) { //generate links backward only to public classes. String classlink = (cd.isPublic() || cd.isProtected())? getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY, cd, false)) : cd.qualifiedName(); String name = cd.containingPackage().name(); if (name.length() > 0) { writeClassName(name + "." + classlink); } else { writeClassName(classlink); } }
/** * Return true if the given ClassDoc should be included * in the serialized form. * * @param cd the ClassDoc object to check for serializability. */ private static boolean serialClassInclude(ClassDoc cd) { if (cd.isEnum()) { return false; } try { cd.superclassType(); } catch (NullPointerException e) { //Workaround for null pointer bug in ClassDoc.superclassType(). return false; } if (cd.isSerializable()) { if (cd.tags("serial").length > 0) { return serialDocInclude(cd); } else if (cd.isPublic() || cd.isProtected()) { return true; } else { return false; } } return false; }
/** * Return true if the given ClassDoc should be included * in the serialized form. * * @param cd the ClassDoc object to check for serializability. */ private static boolean serialClassInclude(ClassDoc cd) { if (cd.isEnum()) { return false; } try { cd.superclassType(); } catch (NullPointerException e) { //Workaround for null pointer bug in ClassDoc.superclassType(). return false; } if (cd.isSerializable()) { if (cd.tags("serial").length > 0) { return serialDocInclude(cd); } else if (cd.isPublic() || cd.isProtected()) { return true; } else { return false; } } return false; }
/** * Get the table caption and header for the constant summary table * * @param cd classdoc to be documented * @return constant members header content */ public Content getConstantMembersHeader(ClassDoc cd) { //generate links backward only to public classes. Content classlink = (cd.isPublic() || cd.isProtected()) ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CONSTANT_SUMMARY, cd)) : new StringContent(cd.qualifiedName()); String name = cd.containingPackage().name(); if (name.length() > 0) { Content cb = new ContentBuilder(); cb.addContent(name); cb.addContent("."); cb.addContent(classlink); return getClassName(cb); } else { return getClassName(classlink); } }
result.setVisibility( VisibilityKindEnum.VK_PRIVATE ); } else if ( classDoc.isProtected() ) { result.setVisibility( VisibilityKindEnum.VK_PROTECTED );
result.setVisibility( VisibilityKindEnum.VK_PRIVATE ); } else if ( classDoc.isProtected() ) { result.setVisibility( VisibilityKindEnum.VK_PROTECTED );
/** * Get the serializable class heading. * * @param classDoc the class being processed * @return a content tree for the class header */ public Content getClassHeader(ClassDoc classDoc) { Content classLink = (classDoc.isPublic() || classDoc.isProtected()) ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, classDoc) .label(configuration.getClassName(classDoc))) : new StringContent(classDoc.qualifiedName()); Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor( classDoc.qualifiedName())); Content superClassLink = classDoc.superclassType() != null ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.SERIALIZED_FORM, classDoc.superclassType())) : null; //Print the heading. Content className = superClassLink == null ? configuration.getResource( "doclet.Class_0_implements_serializable", classLink) : configuration.getResource( "doclet.Class_0_extends_implements_serializable", classLink, superClassLink); li.addContent(HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING, className)); return li; }
String classLink = (classDoc.isPublic() || classDoc.isProtected())? getLink(new LinkInfoImpl(classDoc, configuration.getClassName(classDoc))):