Package org.codehaus.aspectwerkz.exception

Examples of org.codehaus.aspectwerkz.exception.DefinitionException


            initialize();
            if (m_pointcutManagerMap.containsKey(name)) {
                return (PointcutManager)m_pointcutManagerMap.get(name);
            }
            else {
                throw new DefinitionException("aspect " + name + " is not properly defined");
            }
        }
    }
View Full Code Here


        final SystemDefinition definition = new SystemDefinition();

        String uuid = systemElement.attributeValue("id");
        if (uuid == null || uuid.equals("")) {
            throw new DefinitionException("system UUID must be specified");
        }
        definition.setUuid(uuid);

        // parse the include, exclude and prepare elements
        parseIncludePackageElements(systemElement, definition, basePackage);
View Full Code Here

                Class mixin = null;
                try {
                    mixin = aspectClass.getClassLoader().loadClass(packageName + klass);
                }
                catch (ClassNotFoundException e) {
                    throw new DefinitionException(
                            "could not find mixin implementation: "
                            + packageName + klass + " " + e.getMessage()
                    );
                }
View Full Code Here

     *
     * @return the QDox JavaClass
     */
    public JavaClass getJavaClass() {
        if (m_class == null && m_className == null) {
            throw new DefinitionException("no class has been parsed, call parse(..) first");
        }
        if (m_class == null) {
            throw new DefinitionException(
                    "could not find source file for " + m_className + " (have you specified the correct srcDir)"
            );
        }
        return m_class;
    }
View Full Code Here

     *
     * @return an array with the methods
     */
    public JavaMethod[] getJavaMethods() {
        if (m_class == null && m_className == null) {
            throw new DefinitionException("no class has been parsed, call parse(..) first");
        }
        if (m_class == null) {
            throw new DefinitionException(
                    "could not find source file for " + m_className + " (have you specified the correct srcDir)"
            );
        }
        return m_class.getMethods();
    }
View Full Code Here

     *
     * @return an array with the methods
     */
    public JavaField[] getJavaFields() {
        if (m_class == null && m_className == null) {
            throw new DefinitionException("no class has been parsed, call parse(..) first");
        }
        if (m_class == null) {
            throw new DefinitionException(
                    "could not find source file for " + m_className + " (have you specified the correct srcDir)"
            );
        }
        return m_class.getFields();
    }
View Full Code Here

     * @param isDirty flag to mark the the definition as updated or not
     * @return the definition object
     */
    public static AspectWerkzDefinition parse(final File definitionFile, boolean isDirty) {
        if (definitionFile == null) throw new IllegalArgumentException("definition file can not be null");
        if (!definitionFile.exists()) throw new DefinitionException("definition file " + definitionFile.toString() + " does not exist");

        // if definition is not updated; don't parse but return it right away
        if (isNotUpdated(definitionFile)) {
            isDirty = false;
            return s_definition;
        }

        // updated definition, ready to be parsed
        try {
            Document document = createDocument(definitionFile.toURL());
            s_definition = parse(document);

            setParsingTimestamp();
            isDirty = true;

            return s_definition;
        }
        catch (MalformedURLException e) {
            throw new DefinitionException(definitionFile + " does not exist");
        }
        catch (DocumentException e) {
            e.printStackTrace();
            throw new DefinitionException("XML definition file <" + definitionFile + "> has errors: " + e.getMessage());

        }
    }
View Full Code Here

            Document document = createDocument(stream);
            s_definition = parse(document);
            return s_definition;
        }
        catch (DocumentException e) {
            throw new DefinitionException("XML definition file on classpath has errors: " + e.getMessage());
        }
    }
View Full Code Here

                else if (name.equals("deploymentModel") ||
                        name.equals("deployment-model")) {
                    introDef.setDeploymentModel(value);
                }
                else if (name.equals("persistent")) {
                    throw new DefinitionException("persistent introductions are not supported");
//                    introDef.setIsPersistent(value);
                }
                else if (name.equals("attribute")) {
                    introDef.setAttribute(value);
                }
View Full Code Here

                else if (name.equals("deployment-model") ||
                        name.equals("deploymentModel")) {
                    adviceDef.setDeploymentModel(value);
                }
                else if (name.equals("persistent")) {
                    throw new DefinitionException("persistent advices are not supported");
//                    adviceDef.setIsPersistent(value);
                }
                else if (name.equals("attribute")) {
                    adviceDef.setAttribute(value);
                }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.exception.DefinitionException

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.