langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Thu Mar 27 18:41:28 2014 -0400
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Sat Mar 29 11:06:33 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
import com.sun.javadoc.*;
import com.sun.tools.javac.jvm.Profile;
+import com.sun.tools.javadoc.RootDocImpl;
import com.sun.tools.doclets.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.builders.*;
@@ -528,7 +529,7 @@
* {@inheritDoc}
*/
public void addFunctionalInterfaceInfo (Content classInfoTree) {
- if (classDoc.isFunctionalInterface()) {
+ if (isFunctionalInterface()) {
Content dt = HtmlTree.DT(getResource("doclet.Functional_Interface"));
Content dl = HtmlTree.DL(dt);
Content dd = new HtmlTree(HtmlTag.DD);
@@ -538,6 +539,19 @@
}
}
+ public boolean isFunctionalInterface() {
+ if (configuration.root instanceof RootDocImpl) {
+ RootDocImpl root = (RootDocImpl) configuration.root;
+ AnnotationDesc[] annotationDescList = classDoc.annotations();
+ for (AnnotationDesc annoDesc : annotationDescList) {
+ if (root.isFunctionalInterface(annoDesc)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
/**
* {@inheritDoc}
*/