OverviewElement.java revision 3233:b5d08bc0d224
1185029Spjd/*
2185029Spjd * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
3185029Spjd * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4185029Spjd *
5185029Spjd * This code is free software; you can redistribute it and/or modify it
6185029Spjd * under the terms of the GNU General Public License version 2 only, as
7185029Spjd * published by the Free Software Foundation.  Oracle designates this
8185029Spjd * particular file as subject to the "Classpath" exception as provided
9185029Spjd * by Oracle in the LICENSE file that accompanied this code.
10185029Spjd *
11185029Spjd * This code is distributed in the hope that it will be useful, but WITHOUT
12185029Spjd * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13185029Spjd * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14185029Spjd * version 2 for more details (a copy is included in the LICENSE file that
15185029Spjd * accompanied this code).
16185029Spjd *
17185029Spjd * You should have received a copy of the GNU General Public License version
18185029Spjd * 2 along with this work; if not, write to the Free Software Foundation,
19185029Spjd * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20185029Spjd *
21185029Spjd * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22185029Spjd * or visit www.oracle.com if you need additional information or have any
23185029Spjd * questions.
24185029Spjd */
25185029Spjd
26185029Spjdpackage jdk.javadoc.internal.doclets.toolkit;
27185029Spjd
28185029Spjdimport java.lang.annotation.Annotation;
29185029Spjdimport java.util.Set;
30185029Spjd
31185029Spjdimport javax.lang.model.element.AnnotationMirror;
32185029Spjdimport javax.lang.model.element.Element;
33185029Spjdimport javax.lang.model.element.ElementKind;
34185029Spjdimport javax.lang.model.element.ElementVisitor;
35185029Spjdimport javax.lang.model.element.Name;
36185029Spjdimport javax.lang.model.type.TypeMirror;
37185029Spjd
38185029Spjdimport com.sun.tools.javac.util.DefinedBy;
39185029Spjdimport com.sun.tools.javac.util.DefinedBy.Api;
40185029Spjdimport jdk.javadoc.doclet.DocletEnvironment;
41185029Spjd
42185029Spjd/**
43185029Spjd * This is a pseudo element wrapper for the root element, essentially to
44185029Spjd * associate overview documentation's DocCommentTree to this Element.
45185029Spjd *
46185029Spjd *  <p><b>This is NOT part of any supported API.
47185029Spjd *  If you write code that depends on this, you do so at your own risk.
48185029Spjd *  This code and its internal interfaces are subject to change or
49185029Spjd *  deletion without notice.</b>
50185029Spjd */
51185029Spjdpublic class OverviewElement implements Element {
52185029Spjd
53    public final DocletEnvironment root;
54
55    OverviewElement(DocletEnvironment root) {
56        this.root = root;
57    }
58
59    @Override @DefinedBy(Api.LANGUAGE_MODEL)
60    public TypeMirror asType() {
61        throw new UnsupportedOperationException("Unsupported method");
62    }
63
64    @Override @DefinedBy(Api.LANGUAGE_MODEL)
65    public ElementKind getKind() {
66        return ElementKind.OTHER;
67    }
68
69    @Override @DefinedBy(Api.LANGUAGE_MODEL)
70    public Set<javax.lang.model.element.Modifier> getModifiers() {
71        throw new UnsupportedOperationException("Unsupported method");
72    }
73
74    @Override @DefinedBy(Api.LANGUAGE_MODEL)
75    public Name getSimpleName() {
76        throw new UnsupportedOperationException("Unsupported method");
77    }
78
79    @Override @DefinedBy(Api.LANGUAGE_MODEL)
80    public Element getEnclosingElement() {
81        throw new UnsupportedOperationException("Unsupported method");
82    }
83
84    @Override @DefinedBy(Api.LANGUAGE_MODEL)
85    public java.util.List<? extends Element> getEnclosedElements() {
86        throw new UnsupportedOperationException("Unsupported method");
87    }
88
89    @Override @DefinedBy(Api.LANGUAGE_MODEL)
90    public java.util.List<? extends AnnotationMirror> getAnnotationMirrors() {
91        throw new UnsupportedOperationException("Unsupported method");
92    }
93
94    @Override @DefinedBy(Api.LANGUAGE_MODEL)
95    public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
96        throw new UnsupportedOperationException("Unsupported method");
97    }
98
99    @Override @DefinedBy(Api.LANGUAGE_MODEL)
100    public <R, P> R accept(ElementVisitor<R, P> v, P p) {
101        return v.visitUnknown(this, p);
102    }
103
104    @Override @DefinedBy(Api.LANGUAGE_MODEL)
105    public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) {
106        throw new UnsupportedOperationException("Unsupported method");
107    }
108}
109
110