1 /* 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Eclipse Public License, Version 1.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.eclipse.org/org/documents/epl-v10.php 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 com.android.ide.eclipse.adt.editors.layout.gscripts; 18 19 20 /** 21 * Information about an attribute as gathered from the attrs.xml file where 22 * the attribute was declared. This must include a format (string, reference, float, etc.), 23 * possible flag or enum values, whether it's deprecated and its javadoc. 24 */ 25 public interface IAttributeInfo { 26 27 /** An attribute format, e.g. string, reference, float, etc. */ 28 public enum Format { 29 STRING, 30 BOOLEAN, 31 INTEGER, 32 FLOAT, 33 REFERENCE, 34 COLOR, 35 DIMENSION, 36 FRACTION, 37 ENUM, 38 FLAG, 39 } 40 41 /** Returns the XML Name of the attribute */ 42 public String getName(); 43 44 /** Returns the formats of the attribute. Cannot be null. 45 * Should have at least one format. */ 46 public Format[] getFormats(); 47 48 /** Returns the values for enums. null for other types. */ 49 public String[] getEnumValues(); 50 51 /** Returns the values for flags. null for other types. */ 52 public String[] getFlagValues(); 53 54 /** Returns a short javadoc, .i.e. the first sentence. */ 55 public String getJavaDoc(); 56 57 /** Returns the documentation for deprecated attributes. Null if not deprecated. */ 58 public String getDeprecatedDoc(); 59 60 } 61