All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.metadata.spi.ComponentMutableMetaData Maven / Gradle / Ivy

The newest version!
/*
* JBoss, Home of Professional Open Source
* Copyright 2006, JBoss Inc., and individual contributors as indicated
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.metadata.spi;

import java.lang.annotation.Annotation;
import java.lang.reflect.Member;

import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
import org.jboss.metadata.spi.signature.Signature;
import org.jboss.reflect.spi.MemberInfo;

/**
 * ComponentMutableMetaData.
 * 
 * @author Adrian Brock
 * @version $Revision: 57133 $
 */
public interface ComponentMutableMetaData
{
   /**
    * Add a component metadata
    * 
    * @param signature the signature
    * @param component the component
    * @return any previous component at that signature
    */
   MetaDataRetrieval addComponentMetaDataRetrieval(Signature signature, MetaDataRetrieval component);

   /**
    * Remove a component metadata
    * 
    * @param signature the signature
    * @return any previous component at that signature
    */
   MetaDataRetrieval removeComponentMetaDataRetrieval(Signature signature);

   /**
    * Add a component annotation
    * 
    * @param  the annotation type
    * @param signature the signature
    * @param annotation the annotation
    * @return any previous annotation
    */
    T addAnnotation(Signature signature, T annotation);

   /**
    * Remove a member annotation
    * 
    * @param  the annotation type
    * @param signature the signature
    * @param annotationType the annotation type
    * @return any previous annotation
    */
    T removeAnnotation(Signature signature, Class annotationType);

   /**
    * Add member  metaData
    * 
    * @param  the metadata type
    * @param signature the signature
    * @param metaData the meta data
    * @param type the expected type
    * @return any previous meta data
    */
    T addMetaData(Signature signature, T metaData, Class type);

   /**
    * Remove member metaData
    * 
    * @param  the metadata type
    * @param signature the signature
    * @param type the meta data type
    * @return any previous meta data
    */
    T removeMetaData(Signature signature, Class type);

   /**
    * Add member metaData
    *
    * @param  the metadata type
    * @param signature the signature
    * @param name the name
    * @param metaData the meta data
    * @param type the expected type
    * @return any previous meta data
    */
    T addMetaData(Signature signature, String name, T metaData, Class type);

   /**
    * Remove member metadata
    * 
    * @param  the metadata type
    * @param signature the signature
    * @param name the name of the meta data
    * @param type the expected type of the metadata
    * @return the metadata or null if not present
    */
    T removeMetaData(Signature signature, String name, Class type);

   /**
    * Add a component annotation
    * 
    * @param  the annotation type
    * @param member member
    * @param annotation the annotation
    * @return any previous annotation
    */
    T addAnnotation(Member member, T annotation);

   /**
    * Remove a member annotation
    * 
    * @param  the annotation type
    * @param member member
    * @param annotationType the annotation type
    * @return any previous annotation
    */
    T removeAnnotation(Member member, Class annotationType);

   /**
    * Add member  metaData
    * 
    * @param  the metadata type
    * @param member member
    * @param metaData the meta data
    * @param type the expected type
    * @return any previous meta data
    */
    T addMetaData(Member member, T metaData, Class type);

   /**
    * Remove member metaData
    * 
    * @param  the metadata type
    * @param member member
    * @param type the meta data type
    * @return any previous meta data
    */
    T removeMetaData(Member member, Class type);

   /**
    * Add member metaData
    *
    * @param  the metadata type
    * @param member member
    * @param name the name
    * @param metaData the meta data
    * @param type the expected type
    * @return any previous meta data
    */
    T addMetaData(Member member, String name, T metaData, Class type);

   /**
    * Remove member metadata
    * 
    * @param  the metadata type
    * @param member member
    * @param name the name of the meta data
    * @param type the expected type of the metadata
    * @return the metadata or null if not present
    */
    T removeMetaData(Member member, String name, Class type);

   /**
    * Add a member annotation
    * 
    * @param  the annotation type
    * @param member member
    * @param annotation the annotation
    * @return any previous annotation
    */
    T addAnnotation(MemberInfo member, T annotation);

   /**
    * Remove a member annotation
    * 
    * @param  the annotation type
    * @param member member
    * @param annotationType the annotation type
    * @return any previous annotation
    */
    T removeAnnotation(MemberInfo member, Class annotationType);

   /**
    * Add member  metaData
    * 
    * @param  the metadata type
    * @param member member
    * @param metaData the meta data
    * @param type the expected type
    * @return any previous meta data
    */
    T addMetaData(MemberInfo member, T metaData, Class type);

   /**
    * Remove member metaData
    * 
    * @param  the metadata type
    * @param member member
    * @param type the meta data type
    * @return any previous meta data
    */
    T removeMetaData(MemberInfo member, Class type);

   /**
    * Add member metaData
    *
    * @param  the metadata type
    * @param member member
    * @param name the name
    * @param metaData the meta data
    * @param type the expected type
    * @return any previous meta data
    */
    T addMetaData(MemberInfo member, String name, T metaData, Class type);

   /**
    * Remove member metadata
    * 
    * @param  the metadata type
    * @param member member
    * @param name the name of the meta data
    * @param type the expected type of the metadata
    * @return the metadata or null if not present
    */
    T removeMetaData(MemberInfo member, String name, Class type);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy