01: /*
02: * Copyright 2007 Google Inc.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License. You may obtain a copy of
06: * the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12: * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13: * License for the specific language governing permissions and limitations under
14: * the License.
15: */
16: package com.google.gwt.core.ext.typeinfo;
17:
18: import java.util.Arrays;
19:
20: /**
21: * Type representing an annotation type.
22: */
23: public class JAnnotationType extends JRealClassType {
24:
25: public JAnnotationType(TypeOracle oracle,
26: CompilationUnitProvider cup, JPackage declaringPackage,
27: JClassType enclosingType, boolean isLocalType, String name,
28: int declStart, int declEnd, int bodyStart, int bodyEnd,
29: boolean isInterface) {
30: super (oracle, cup, declaringPackage, enclosingType,
31: isLocalType, name, declStart, declEnd, bodyStart,
32: bodyEnd, isInterface);
33: }
34:
35: @Override
36: public JAnnotationMethod getMethod(String name, JType[] paramTypes)
37: throws NotFoundException {
38: return (JAnnotationMethod) super .getMethod(name, paramTypes);
39: }
40:
41: @Override
42: public JAnnotationMethod[] getMethods() {
43: JMethod[] methodArray = super .getMethods();
44: return Arrays.asList(methodArray).toArray(
45: new JAnnotationMethod[0]);
46: }
47:
48: @Override
49: public JAnnotationMethod[] getOverridableMethods() {
50: JMethod[] methodArray = super .getOverridableMethods();
51: return Arrays.asList(methodArray).toArray(
52: new JAnnotationMethod[0]);
53: }
54:
55: @Override
56: public JAnnotationType isAnnotation() {
57: return this;
58: }
59:
60: }
|