001 /* 002 * Licensed under the Apache License, Version 2.0 (the "License"); 003 * you may not use this file except in compliance with the License. 004 * You may obtain a copy of the License at 005 * 006 * http://www.apache.org/licenses/LICENSE-2.0 007 * 008 * Unless required by applicable law or agreed to in writing, software 009 * distributed under the License is distributed on an "AS IS" BASIS, 010 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 011 * See the License for the specific language governing permissions and 012 * limitations under the License. 013 */ 014 package org.apache.commons.classscan.model; 015 016 import java.util.Set; 017 018 import org.apache.commons.classscan.HasName; 019 020 /** 021 * Metadata about a Class field 022 */ 023 public interface MetaField extends HasName { 024 /** 025 * Get the name of the method or constructor 026 */ 027 String getName(); 028 029 /** 030 * Get metadata about the annotations on the field. 031 * 032 * @return A read-only set of annotations 033 */ 034 Set<? extends MetaAnnotation> getAnnotations(); 035 036 /** 037 * Get metadata about a particular annotation on the corresponding field. 038 * 039 * @param annotationName 040 * The name of the annotation desired 041 * 042 * @return The annotation information, or null if not specified on the 043 * corresponding field 044 */ 045 MetaAnnotation getAnnotation(String annotationName); 046 047 /** 048 * Get whether the corresponding field is a static field 049 */ 050 boolean isStatic(); 051 052 /** 053 * Get metadata about the field's type 054 */ 055 MetaType getType(); 056 }