1
1
/*
2
- * Copyright (c) 1997, 2018 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 1997, 2019 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -78,8 +78,8 @@ public AbstractExecutableMemberWriter(SubWriterHolderWriter writer) {
78
78
protected void addTypeParameters (ExecutableElement member , Content htmltree ) {
79
79
Content typeParameters = getTypeParameters (member );
80
80
if (!typeParameters .isEmpty ()) {
81
- htmltree .addContent (typeParameters );
82
- htmltree .addContent (Contents .SPACE );
81
+ htmltree .add (typeParameters );
82
+ htmltree .add (Contents .SPACE );
83
83
}
84
84
}
85
85
@@ -100,16 +100,16 @@ protected Content getTypeParameters(ExecutableElement member) {
100
100
@ Override
101
101
protected Content getDeprecatedLink (Element member ) {
102
102
Content deprecatedLinkContent = new ContentBuilder ();
103
- deprecatedLinkContent .addContent (utils .getFullyQualifiedName (member ));
103
+ deprecatedLinkContent .add (utils .getFullyQualifiedName (member ));
104
104
if (!utils .isConstructor (member )) {
105
- deprecatedLinkContent .addContent ("." );
106
- deprecatedLinkContent .addContent (member .getSimpleName ());
105
+ deprecatedLinkContent .add ("." );
106
+ deprecatedLinkContent .add (member .getSimpleName ());
107
107
}
108
108
String signature = utils .flatSignature ((ExecutableElement ) member );
109
109
if (signature .length () > 2 ) {
110
- deprecatedLinkContent .addContent (Contents .ZERO_WIDTH_SPACE );
110
+ deprecatedLinkContent .add (Contents .ZERO_WIDTH_SPACE );
111
111
}
112
- deprecatedLinkContent .addContent (signature );
112
+ deprecatedLinkContent .add (signature );
113
113
114
114
return writer .getDocLink (MEMBER , utils .getEnclosingTypeElement (member ), member , deprecatedLinkContent );
115
115
}
@@ -131,7 +131,7 @@ protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement te, Element
131
131
name (ee ), false ));
132
132
Content code = HtmlTree .CODE (memberLink );
133
133
addParameters (ee , false , code , name (ee ).length () - 1 );
134
- tdSummary .addContent (code );
134
+ tdSummary .add (code );
135
135
}
136
136
137
137
/**
@@ -143,7 +143,7 @@ protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement te, Element
143
143
*/
144
144
@ Override
145
145
protected void addInheritedSummaryLink (TypeElement te , Element member , Content linksTree ) {
146
- linksTree .addContent (writer .getDocLink (MEMBER , te , member , name (member ), false ));
146
+ linksTree .add (writer .getDocLink (MEMBER , te , member , name (member ), false ));
147
147
}
148
148
149
149
/**
@@ -158,10 +158,10 @@ protected void addParam(ExecutableElement member, VariableElement param,
158
158
boolean isVarArg , Content tree ) {
159
159
Content link = writer .getLink (new LinkInfoImpl (configuration , EXECUTABLE_MEMBER_PARAM ,
160
160
param .asType ()).varargs (isVarArg ));
161
- tree .addContent (link );
161
+ tree .add (link );
162
162
if (name (param ).length () > 0 ) {
163
- tree .addContent (Contents .SPACE );
164
- tree .addContent (name (param ));
163
+ tree .add (Contents .SPACE );
164
+ tree .add (name (param ));
165
165
}
166
166
}
167
167
@@ -176,12 +176,12 @@ protected void addParam(ExecutableElement member, VariableElement param,
176
176
protected void addReceiverAnnotations (ExecutableElement member , TypeMirror rcvrType ,
177
177
List <? extends AnnotationMirror > annotationMirrors , Content tree ) {
178
178
writer .addReceiverAnnotationInfo (member , rcvrType , annotationMirrors , tree );
179
- tree .addContent (Contents .SPACE );
180
- tree .addContent (utils .getTypeName (rcvrType , false ));
179
+ tree .add (Contents .SPACE );
180
+ tree .add (utils .getTypeName (rcvrType , false ));
181
181
LinkInfoImpl linkInfo = new LinkInfoImpl (configuration , RECEIVER_TYPE , rcvrType );
182
- tree .addContent (writer .getTypeParameterLinks (linkInfo ));
183
- tree .addContent (Contents .SPACE );
184
- tree .addContent ("this" );
182
+ tree .add (writer .getTypeParameterLinks (linkInfo ));
183
+ tree .add (Contents .SPACE );
184
+ tree .add ("this" );
185
185
}
186
186
187
187
@@ -216,7 +216,7 @@ protected void addParameters(ExecutableElement member,
216
216
}
217
217
int paramstart ;
218
218
for (paramstart = 0 ; paramstart < parameters .size (); paramstart ++) {
219
- paramTree .addContent (sep );
219
+ paramTree .add (sep );
220
220
VariableElement param = parameters .get (paramstart );
221
221
222
222
if (param .getKind () != ElementKind .INSTANCE_INIT ) {
@@ -225,8 +225,8 @@ protected void addParameters(ExecutableElement member,
225
225
writer .addAnnotationInfo (indent .length (),
226
226
member , param , paramTree );
227
227
if (foundAnnotations ) {
228
- paramTree .addContent (DocletConstants .NL );
229
- paramTree .addContent (indent );
228
+ paramTree .add (DocletConstants .NL );
229
+ paramTree .add (indent );
230
230
}
231
231
}
232
232
addParam (member , param ,
@@ -236,28 +236,28 @@ protected void addParameters(ExecutableElement member,
236
236
}
237
237
238
238
for (int i = paramstart + 1 ; i < parameters .size (); i ++) {
239
- paramTree .addContent ("," );
240
- paramTree .addContent (DocletConstants .NL );
241
- paramTree .addContent (indent );
239
+ paramTree .add ("," );
240
+ paramTree .add (DocletConstants .NL );
241
+ paramTree .add (indent );
242
242
if (includeAnnotations ) {
243
243
boolean foundAnnotations =
244
244
writer .addAnnotationInfo (indent .length (), member , parameters .get (i ),
245
245
paramTree );
246
246
if (foundAnnotations ) {
247
- paramTree .addContent (DocletConstants .NL );
248
- paramTree .addContent (indent );
247
+ paramTree .add (DocletConstants .NL );
248
+ paramTree .add (indent );
249
249
}
250
250
}
251
251
addParam (member , parameters .get (i ), (i == parameters .size () - 1 ) && member .isVarArgs (),
252
252
paramTree );
253
253
}
254
254
if (paramTree .isEmpty ()) {
255
- htmltree .addContent ("()" );
255
+ htmltree .add ("()" );
256
256
} else {
257
- htmltree .addContent (Contents .ZERO_WIDTH_SPACE );
258
- htmltree .addContent ("(" );
259
- htmltree .addContent (paramTree );
260
- paramTree .addContent (")" );
257
+ htmltree .add (Contents .ZERO_WIDTH_SPACE );
258
+ htmltree .add ("(" );
259
+ htmltree .add (paramTree );
260
+ paramTree .add (")" );
261
261
}
262
262
}
263
263
@@ -271,19 +271,19 @@ protected void addExceptions(ExecutableElement member, Content htmltree, int ind
271
271
List <? extends TypeMirror > exceptions = member .getThrownTypes ();
272
272
if (!exceptions .isEmpty ()) {
273
273
CharSequence indent = makeSpace (indentSize + 1 - 7 );
274
- htmltree .addContent (DocletConstants .NL );
275
- htmltree .addContent (indent );
276
- htmltree .addContent ("throws " );
274
+ htmltree .add (DocletConstants .NL );
275
+ htmltree .add (indent );
276
+ htmltree .add ("throws " );
277
277
indent = makeSpace (indentSize + 1 );
278
278
Content link = writer .getLink (new LinkInfoImpl (configuration , MEMBER , exceptions .get (0 )));
279
- htmltree .addContent (link );
279
+ htmltree .add (link );
280
280
for (int i = 1 ; i < exceptions .size (); i ++) {
281
- htmltree .addContent ("," );
282
- htmltree .addContent (DocletConstants .NL );
283
- htmltree .addContent (indent );
281
+ htmltree .add ("," );
282
+ htmltree .add (DocletConstants .NL );
283
+ htmltree .add (indent );
284
284
Content exceptionLink = writer .getLink (new LinkInfoImpl (configuration , MEMBER ,
285
285
exceptions .get (i )));
286
- htmltree .addContent (exceptionLink );
286
+ htmltree .add (exceptionLink );
287
287
}
288
288
}
289
289
}
0 commit comments