src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java

changeset 1746
bd51ca92c013
parent 1359
25e14ad23cef
child 1751
ca8808c88f94
equal deleted inserted replaced
1745:937aa020c667 1746:bd51ca92c013
1 /* 1 /*
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
26 package com.sun.tools.doclets.internal.toolkit.taglets; 26 package com.sun.tools.doclets.internal.toolkit.taglets;
27 27
28 import java.util.*; 28 import java.util.*;
29 29
30 import com.sun.javadoc.*; 30 import com.sun.javadoc.*;
31 import com.sun.tools.doclets.formats.html.markup.StringContent;
31 import com.sun.tools.doclets.internal.toolkit.Configuration; 32 import com.sun.tools.doclets.internal.toolkit.Configuration;
32 import com.sun.tools.doclets.internal.toolkit.util.*; 33 import com.sun.tools.doclets.internal.toolkit.util.*;
33 34
34 /** 35 /**
35 * An inline Taglet representing the value tag. This tag should only be used with 36 * An inline Taglet representing the value tag. This tag should only be used with
167 //Reference is unknown. 168 //Reference is unknown.
168 writer.getMsgRetriever().warning(tag.holder().position(), 169 writer.getMsgRetriever().warning(tag.holder().position(),
169 "doclet.value_tag_invalid_reference", tag.text()); 170 "doclet.value_tag_invalid_reference", tag.text());
170 } else if (field.constantValue() != null) { 171 } else if (field.constantValue() != null) {
171 return writer.valueTagOutput(field, 172 return writer.valueTagOutput(field,
172 Util.escapeHtmlChars(field.constantValueExpression()), 173 field.constantValueExpression(),
173 ! field.equals(tag.holder())); 174 ! field.equals(tag.holder()));
174 } else { 175 } else {
175 //Referenced field is not a constant. 176 //Referenced field is not a constant.
176 writer.getMsgRetriever().warning(tag.holder().position(), 177 writer.getMsgRetriever().warning(tag.holder().position(),
177 "doclet.value_tag_invalid_constant", field.name()); 178 "doclet.value_tag_invalid_constant", field.name());

mercurial