docProcessor.processParamTag(paramTag, parameter, paramDocType); final AnnotationDesc[] annotations = parameter.annotations(); if (annotations != null) { for (final AnnotationDesc annotationDesc : annotations) {
/** * This creates an AnnotationParser for a parameter * * @param parameter The parameter javadoc item * @param options The doclet options */ public AnnotationParser(Parameter parameter, DocletOptions options) { this.annotations = parameter.annotations(); this.options = options; }
/** * Add the annotatation types for the given doc and parameter. * * @param indent the number of spaces to indent the parameters. * @param doc the doc to write annotations for. * @param param the parameter to write annotations for. * @param tree the content tree to which the annotation types will be added */ public boolean addAnnotationInfo(int indent, Doc doc, Parameter param, Content tree) { return addAnnotationInfo(indent, doc, param.annotations(), false, tree); }
/** * Write the annotatation types for the given doc and parameter. * * @param indent the number of spaced to indent the parameters. * @param doc the doc to write annotations for. * @param param the parameter to write annotations for. */ public boolean writeAnnotationInfo( int indent, Doc doc, Parameter param ) { return writeAnnotationInfo( indent, doc, param.annotations(), false ); }
protected MethodParameter parseMethodParameter(Parameter parameter) { MethodParameter parameterMethodNode = objectFactory.createMethodParameter(); parameterMethodNode.setName(parameter.name()); parameterMethodNode.setType(parseTypeInfo(parameter.type())); for (AnnotationDesc annotationDesc : parameter.annotations()) { parameterMethodNode.getAnnotation().add(parseAnnotationDesc(annotationDesc, parameter.typeName())); } return parameterMethodNode; }
/** * Map the AnnotationType to the ProgramElementDocs that use them as * type parameters. * * @param map the map the insert the information into. * @param doc the doc whose type parameters are being checked. * @param holder the holder that owns the type parameters. */ private <T extends ProgramElementDoc> void mapAnnotations(Map<String,List<T>> map, Object doc, T holder) { AnnotationDesc[] annotations; boolean isPackage = false; if (doc instanceof ProgramElementDoc) { annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations(); isPackage = true; } else if (doc instanceof Parameter) { annotations = ((Parameter) doc).annotations(); } else { throw new DocletAbortException(); } for (int i = 0; i < annotations.length; i++) { AnnotationTypeDoc annotationDoc = annotations[i].annotationType(); if (isPackage) refList(map, annotationDoc).add(holder); else add(map, annotationDoc, holder); } }
/** * Map the AnnotationType to the ProgramElementDocs that use them as * type parameters. * * @param map the map the insert the information into. * @param doc the doc whose type parameters are being checked. * @param holder the holder that owns the type parameters. */ private <T extends ProgramElementDoc> void mapAnnotations(Map<String,List<T>> map, Object doc, T holder) { AnnotationDesc[] annotations; boolean isPackage = false; if (doc instanceof ProgramElementDoc) { annotations = ((ProgramElementDoc) doc).annotations(); } else if (doc instanceof PackageDoc) { annotations = ((PackageDoc) doc).annotations(); isPackage = true; } else if (doc instanceof Parameter) { annotations = ((Parameter) doc).annotations(); } else { throw new DocletAbortException("should not happen"); } for (int i = 0; i < annotations.length; i++) { AnnotationTypeDoc annotationDoc = annotations[i].annotationType(); if (isPackage) refList(map, annotationDoc).add(holder); else add(map, annotationDoc, holder); } }
docProcessor.processParamTag( paramTag, parameter, paramDocType ); AnnotationDesc[] annotations = parameter.annotations(); if ( annotations != null ) { for ( AnnotationDesc annotationDesc : annotations ) {