Package org.apache.tuscany.core.system.annotation

Examples of org.apache.tuscany.core.system.annotation.Autowire


*/
public class AutowireProcessor extends ImplementationProcessorSupport {

    @Override
    public void visitMethod(Method method, ComponentType type) throws ConfigurationLoadException {
        Autowire annotation = method.getAnnotation(Autowire.class);
        if (annotation != null) {
            if (!Modifier.isPublic(method.getModifiers())) {
                InvalidSetterException e = new InvalidSetterException("Autowire setter method is not public");
                e.setIdentifier(method.toString());
                throw e;
View Full Code Here


    @Override
    public void visitField(Field field, ComponentType type) throws ConfigurationLoadException {
        checkAutowireType(field.getType(),field.getDeclaringClass());
        int modifiers = field.getModifiers();
        Autowire annotation = field.getAnnotation(Autowire.class);
        if (annotation != null) {
            if (!Modifier.isPublic(modifiers) && !Modifier.isProtected(modifiers)) {
                InvalidSetterException e = new InvalidSetterException("Autowire field is not public or protected");
                e.setIdentifier(field.getName());
                throw e;
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.system.annotation.Autowire

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.