Package org.apache.tuscany.sca.extensibility

Examples of org.apache.tuscany.sca.extensibility.ServiceDeclaration.loadClass()


            Class<? extends ModelResolver> resolver = resolvers.get(c);
            if (resolver == null) {
                ServiceDeclaration resolverClass = loadedResolvers.get(c.getName());
                if (resolverClass != null) {
                    try {
                        return (Class<? extends ModelResolver>)resolverClass.loadClass();
                    } catch (ClassNotFoundException e) {
                        throw new IllegalArgumentException(e);
                    }
                }
            } else {
View Full Code Here


        Class<? extends ModelResolver > resolver = resolvers.get(modelType);
        if (resolver == null) {
            ServiceDeclaration resolverClass = loadedResolvers.get(modelType.getName());
            if (resolverClass != null) {
                try {
                    return (Class<? extends ModelResolver>)resolverClass.loadClass();
                } catch (ClassNotFoundException e) {
                    throw new IllegalArgumentException(e);
                }
            }
        }
View Full Code Here

            Class<? extends ModelResolver> resolver = resolvers.get(c);
            if (resolver == null) {
                ServiceDeclaration resolverClass = loadedResolvers.get(c.getName());
                if (resolverClass != null) {
                    try {
                        return (Class<? extends ModelResolver>)resolverClass.loadClass();
                    } catch (ClassNotFoundException e) {
                        throw new IllegalArgumentException(e);
                    }
                }
            } else {
View Full Code Here

        Class<? extends ModelResolver > resolver = resolvers.get(modelType);
        if (resolver == null) {
            ServiceDeclaration resolverClass = loadedResolvers.get(modelType.getName());
            if (resolverClass != null) {
                try {
                    return (Class<? extends ModelResolver>)resolverClass.loadClass();
                } catch (ClassNotFoundException e) {
                    throw new IllegalArgumentException(e);
                }
            }
        }
View Full Code Here

            Class<? extends ModelResolver> resolver = resolvers.get(c);
            if (resolver == null) {
                ServiceDeclaration resolverClass = loadedResolvers.get(c.getName());
                if (resolverClass != null) {
                    try {
                        return (Class<? extends ModelResolver>)resolverClass.loadClass();
                    } catch (ClassNotFoundException e) {
                        throw new IllegalArgumentException(e);
                    }
                }
            } else {
View Full Code Here

        Class<? extends ModelResolver > resolver = resolvers.get(modelType);
        if (resolver == null) {
            ServiceDeclaration resolverClass = loadedResolvers.get(modelType.getName());
            if (resolverClass != null) {
                try {
                    return (Class<? extends ModelResolver>)resolverClass.loadClass();
                } catch (ClassNotFoundException e) {
                    throw new IllegalArgumentException(e);
                }
            }
        }
View Full Code Here

            // Dynamically load a factory class declared under META-INF/services
            try {
                ServiceDeclaration factoryDeclaration = ServiceDiscovery.getInstance().getFirstServiceDeclaration(factoryInterface.getName());
                if (factoryDeclaration != null) {
                    Class<?> factoryClass = factoryDeclaration.loadClass();
           
                    // Default empty constructor
                    Constructor<?> constructor = factoryClass.getConstructor(ExtensionPointRegistry.class);
                    factory = constructor.newInstance(registry);
           
View Full Code Here

            Class<? extends ModelResolver> resolver = resolvers.get(c);
            if (resolver == null) {
                ServiceDeclaration resolverClass = loadedResolvers.get(c.getName());
                if (resolverClass != null) {
                    try {
                        return (Class<? extends ModelResolver>)resolverClass.loadClass();
                    } catch (ClassNotFoundException e) {
                        throw new IllegalArgumentException(e);
                    }
                }
            } else {
View Full Code Here

        Class<? extends ModelResolver > resolver = resolvers.get(modelType);
        if (resolver == null) {
            ServiceDeclaration resolverClass = loadedResolvers.get(modelType.getName());
            if (resolverClass != null) {
                try {
                    return (Class<? extends ModelResolver>)resolverClass.loadClass();
                } catch (ClassNotFoundException e) {
                    throw new IllegalArgumentException(e);
                }
            }
        }
View Full Code Here

           
            // Dynamically load a utility class declared under META-INF/utilities          
            try {
                ServiceDeclaration utilityDeclaration =ServiceDiscovery.getInstance().getFirstServiceDeclaration(utilityType.getName());
                if (utilityDeclaration != null) {
                    Class<?> utilityClass = utilityDeclaration.loadClass();
                   
                    // Construct the utility
                    Constructor<?>[] constructors = utilityClass.getConstructors();
                    Constructor<?> constructor = getConstructor(constructors, new Class<?>[] {ExtensionPointRegistry.class});
                    if (constructor != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.