1 /* 2 * JBoss, Home of Professional Open Source 3 * Copyright 2005, JBoss Inc., and individual contributors as indicated 4 * by the @authors tag. See the copyright.txt in the distribution for a 5 * full listing of individual contributors. 6 * 7 * This is free software; you can redistribute it and/or modify it 8 * under the terms of the GNU Lesser General Public License as 9 * published by the Free Software Foundation; either version 2.1 of 10 * the License, or (at your option) any later version. 11 * 12 * This software is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this software; if not, write to the Free 19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 21 */ 22 package org.jboss.beans.info.spi; 23 24 import java.util.List; 25 import java.util.Set; 26 27 import org.jboss.joinpoint.spi.JoinpointFactory; 28 import org.jboss.reflect.spi.ClassInfo; 29 import org.jboss.reflect.spi.ConstructorInfo; 30 import org.jboss.reflect.spi.MethodInfo; 31 import org.jboss.repository.spi.MetaDataContext; 32 import org.jboss.repository.spi.MetaDataContextFactory; 33 import org.jboss.util.JBossInterface; 34 35 /** 36 * Description of a bean. 37 * 38 * @author <a HREF="adrian@jboss.com">Adrian Brock</a> 39 * @version $Revision: 57133 $ 40 */ 41 public interface BeanInfo extends JBossInterface 42 { 43 /** 44 * Get the bean name 45 * 46 * @return the name 47 */ 48 String getName(); 49 50 /** 51 * Get the class information 52 * 53 * @return the class information 54 */ 55 ClassInfo getClassInfo(); 56 57 /** 58 * Return a BeanInfo for this bean instance 59 * 60 * @return an instance info for this bean 61 */ 62 BeanInfo getInstanceInfo(); 63 64 /** 65 * Bean may have additional dependencies 66 * that the kernel cannot initially resolve. (currently defined by ClassAdapter) 67 * 68 * @return the list of dependencies 69 */ 70 List<Object> getDependencies(); 71 72 /** 73 * Get the joinpoint factory 74 * 75 * @return the joinpoint factory 76 */ 77 JoinpointFactory getJoinpointFactory(); 78 79 /** 80 * Get the metadata context factory 81 * 82 * @return the metadata context factory 83 */ 84 MetaDataContextFactory getMetaDataContextFactory(); 85 86 /** 87 * Get the property information. 88 * 89 * @return a Set<PropertyInfo> 90 */ 91 Set<PropertyInfo> getProperties(); 92 93 /** 94 * Set the property information. 95 * 96 * @param properties a Set<PropertyInfo> 97 */ 98 void setProperties(Set<PropertyInfo> properties); 99 100 /** 101 * Get the constructor info. 102 * 103 * @return a Set<ConstructorInfo> 104 */ 105 Set<ConstructorInfo> getConstructors(); 106 107 /** 108 * Set the constructor info. 109 * 110 * @param constructors a Set<ConstructorInfo> 111 */ 112 void setConstructors(Set<ConstructorInfo> constructors); 113 114 /** 115 * Get the method information. 116 * 117 * @return a Set<MethodInfo> 118 */ 119 Set<MethodInfo> getMethods(); 120 121 /** 122 * Set the method information. 123 * 124 * @param methods a Set<MethodInfo> 125 */ 126 void setMethods(Set<MethodInfo> methods); 127 128 /** 129 * Get the event information. 130 * 131 * @return a Set<EventInfo> 132 */ 133 Set<EventInfo> getEvents(); 134 135 /** 136 * set the event information. 137 * 138 * @param events a Set<EventInfo> 139 */ 140 void setEvents(Set<EventInfo> events); 141 142 /** 143 * Get the bean info factory 144 * 145 * @return the factory 146 */ 147 BeanInfoFactory getBeanInfoFactory(); 148 149 150 /** 151 * Get the metadata context 152 * 153 * @return the metadata context 154 */ 155 MetaDataContext getMetaDataContext(); 156 157 /** 158 * Set the metadata context 159 * 160 * @param metaCtx a metadata context 161 */ 162 void setMetaDataContext(MetaDataContext metaCtx); 163 } 164