OverviewElement.java revision 3595:81692f730015
1/*
2 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.  Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26package jdk.javadoc.internal.doclets.toolkit;
27
28import java.lang.annotation.Annotation;
29import java.util.Set;
30
31import javax.lang.model.element.AnnotationMirror;
32import javax.lang.model.element.Element;
33import javax.lang.model.element.ElementKind;
34import javax.lang.model.element.ElementVisitor;
35import javax.lang.model.element.Name;
36import javax.lang.model.type.TypeMirror;
37
38import com.sun.tools.javac.util.DefinedBy;
39import com.sun.tools.javac.util.DefinedBy.Api;
40import jdk.javadoc.doclet.DocletEnvironment;
41
42/**
43 * This is a pseudo element wrapper for the overview element, essentially to
44 * associate overview documentation's DocCommentTree to this element.
45 *
46 *  <p><b>This is NOT part of any supported API.
47 *  If you write code that depends on this, you do so at your own risk.
48 *  This code and its internal interfaces are subject to change or
49 *  deletion without notice.</b>
50 */
51public class OverviewElement implements Element {
52
53    public final DocletEnvironment docEnv;
54
55    OverviewElement(DocletEnvironment docEnv) {
56        this.docEnv = docEnv;
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