1 /* 2 * Copyright (C) 2009 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package signature.model; 18 19 /** 20 * {@code IAnnotationField} models a field in a annotation definition. The 21 * following example shows an annotation field <code>androField</code> of type 22 * String and the default value "droid". 23 * 24 * <pre> 25 * 26 * @interface A { String androField() default "droid"; } 27 * 28 * </pre> 29 */ 30 public interface IAnnotationField extends IField { 31 32 /** 33 * Returns the default value. If no default value is set then null is 34 * returned. 35 * 36 * The type of the returned object is one of the following: 37 * <ul> 38 * <li>a wrapper class for a primitive type 39 * <li>String (for String values) 40 * <li>IType (representing a class literal) 41 * <li>IEnumConstant (representing an enum constant) 42 * <li>IAnnotation 43 * </ul> 44 * and (one-dimensional) arrays of the above types. If an array is returned, 45 * then the type of the result is Object[]. The elements of this array are 46 * of the above listed types. 47 */ 48 Object getDefaultValue(); 49 } 50