ConstructorWriterImpl.java revision 116
/*
* Copyright 1997-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Sun designates this
* particular file as subject to the "Classpath" exception as provided
* by Sun in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/**
* Writes constructor documentation.
*
* @author Robert Field
* @author Atul M Dambalkar
*/
public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
implements ConstructorWriter, MemberSummaryWriter {
private boolean foundNonPubConstructor = false;
private boolean printedSummaryHeader = false;
/**
* Construct a new ConstructorWriterImpl.
*
* @param writer The writer for the class that the constructors belong to.
* @param classDoc the class being documented.
*/
List<ProgramElementDoc> constructors = new ArrayList<ProgramElementDoc>(visibleMemberMap.getMembersFor(classDoc));
setFoundNonPubConstructor(true);
}
}
}
/**
* Construct a new ConstructorWriterImpl.
*
* @param writer The writer for the class that the constructors belong to.
*/
super(writer);
}
/**
* Write the constructors summary header for the given class.
*
* @param classDoc the class the summary belongs to.
*/
printedSummaryHeader = true;
}
/**
* Write the constructors summary footer for the given class.
*
* @param classDoc the class the summary belongs to.
*/
}
/**
* Write the header for the constructor documentation.
*
* @param classDoc the class that the constructors belong to.
*/
}
/**
* Write the constructor header for the given constructor.
*
* @param constructor the constructor being documented.
* @param isFirst the flag to indicate whether or not the constructor is the
* first to be documented.
*/
if (! isFirst) {
}
}
}
/**
* Write the signature for the given constructor.
*
* @param constructor the constructor being documented.
*/
//printReturnType((ConstructorDoc)constructor);
if (configuration().linksource) {
} else {
}
}
/**
* Write the deprecated output for the given constructor.
*
* @param constructor the constructor being documented.
*/
}
}
/**
* Write the comments for the given constructor.
*
* @param constructor the constructor being documented.
*/
}
}
/**
* Write the tag output for the given constructor.
*
* @param constructor the constructor being documented.
*/
}
/**
* Write the constructor footer.
*/
public void writeConstructorFooter() {
}
/**
* Write the footer for the constructor documentation.
*
* @param classDoc the class that the constructors belong to.
*/
//No footer to write for constructor documentation
}
/**
* Close the writer.
*/
public void close() throws IOException {
}
/**
* Let the writer know whether a non public constructor was found.
*
* @param foundNonPubConstructor true if we found a non public constructor.
*/
public void setFoundNonPubConstructor(boolean foundNonPubConstructor) {
}
}
}
} // no such
// no such
}
public int getMemberKind() {
return VisibleMemberMap.CONSTRUCTORS;
}
}
if (link) {
} else {
}
}
protected void printNavDetailLink(boolean link) {
if (link) {
} else {
}
}
if (foundNonPubConstructor) {
if (member.isProtected()) {
print("protected ");
print("private ");
} else {
}
}
}
/**
* Write the inherited member summary header for the given class.
*
* @param classDoc the class the summary belongs to.
*/
if(! printedSummaryHeader){
//We don't want inherited summary to not be under heading.
printedSummaryHeader = true;
}
}
/**
* {@inheritDoc}
*/
/**
* Write the inherited member summary footer for the given class.
*
* @param classDoc the class the summary belongs to.
*/
}