alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Commons Attributes example source code file (AttributeRepositoryClass.java)

This example Commons Attributes source code file (AttributeRepositoryClass.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Commons Attributes tags/keywords

attributerepositoryclass, attributerepositoryclass, map, map, set, set, util

The Commons Attributes AttributeRepositoryClass.java source code

/*
 * Copyright 2003-2004 The Apache Software Foundation
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.attributes;

import java.util.Set;
import java.util.Map;

/**
 * Interface implemented by all attribute repository classes.
 * This interface is used internally and should not be used
 * by clients. The only reason it is public is because the
 * classes implementing it may be in any package.
 *
 * @since 2.1
 */
public interface AttributeRepositoryClass {
    
    /**
     * Returns a set containing all attributes (instances) associated with this class.
     * Should not return any attributes of superclasses etc.
     *
     * @since 2.1
     */
    public Set getClassAttributes ();
    
    /**
     * Returns a map with String keys and Set values. The keys correspond to field names,
     * and their associated Set values are the set of all attributes (instances) associated with that field.
     * Should not return any attributes of superclasses etc.
     *
     * @since 2.1
     */
    public Map getFieldAttributes ();
    
    /**
     * Returns a map with String keys and List values. The keys correspond to method signatures,
     * given by get Util.getSignature method, and the lists are as follows:<p>
     * 
     * list.get(0) = A Set with the attributes associated with the method.<p>
     * list.get(1) = A Set with the attributes associated with the method's return value.<p>
     * list.get(2) = A Set with the attributes associated with the method's first parameter.<p>
     * list.get(n) = A Set with the attributes associated with the method's (n - 1) th parameter.<p>
     *
     * All slots in the list must be filled, not just those where there are attributes.
     * 
     * <p>Should not return any attributes of superclasses etc.
     *
     * @since 2.1
     */
    public Map getMethodAttributes ();
    
    /**
     * Returns a map with String keys and List values. The keys correspond to constructor signatures,
     * given by get Util.getSignature method, and the lists are as follows:<p>
     * 
     * list.get(0) = A Set with the attributes associated with the constructor.<p>
     * list.get(1) = A Set with the attributes associated with the constructor's first parameter.<p>
     * list.get(n) = A Set with the attributes associated with the constructor's (n - 1) th parameter.<p>
     *
     * All slots in the list must be filled, not just those where there are attributes.
     * 
     * <p>Should not return any attributes of superclasses etc.
     *
     * @since 2.1
     */
    public Map getConstructorAttributes ();
}

Other Commons Attributes examples (source code examples)

Here is a short list of links related to this Commons Attributes AttributeRepositoryClass.java source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.