org.ow2.util.scan.api.configurator.basic.MethodMetadataConfigurator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scan-api Show documentation
Show all versions of scan-api Show documentation
API for Managing the Scan stuff
The newest version!
/**
* Copyright 2006-2012 Bull S.A.S.
*
* 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.ow2.util.scan.api.configurator.basic;
import org.ow2.util.scan.api.IScannerResult;
import org.ow2.util.scan.api.configurator.IMethodConfigurator;
import org.ow2.util.scan.api.metadata.IMethodMetadata;
/**
* MethodMetadataConfigurator is a configurator of field specific to MethodMetata.
* @author Gael Lalire
*/
public class MethodMetadataConfigurator extends BasicConfigurator implements IMethodConfigurator {
/**
* the method metadata.
*/
private final IMethodMetadata methodMetadata;
/**
* @return the method metadata
*/
protected IMethodMetadata getMethodMetadata() {
return methodMetadata;
}
/**
* Constructor.
* @param methodMetadata the method metadata
*/
public MethodMetadataConfigurator(final IMethodMetadata methodMetadata) {
this.methodMetadata = methodMetadata;
}
/**
* Add method metadata to his class metadata when configuration ended.
* @param referencedClasses you may fill this set with class referenced in current metadata
*/
@Override
public void configurationComplete(final IScannerResult scannerResult) {
super.configurationComplete(scannerResult);
methodMetadata.getClassMetadata().addMethodMetadata(methodMetadata);
}
}