Package org.codehaus.aspectwerkz.exception

Examples of org.codehaus.aspectwerkz.exception.DefinitionException


        } catch (Throwable e1) {
            initialize();
            try {
                introduction = m_mixins[m_definition.getMixinIndexByName(name) - 1];
            } catch (ArrayIndexOutOfBoundsException e2) {
                throw new DefinitionException("no introduction with name " + name);
            }
        }
        return introduction;
    }
View Full Code Here


        if (name == null) {
            throw new IllegalArgumentException("aspect name can not be null");
        }
        final int index = m_aspectIndexes.get(name);
        if (index == 0) {
            throw new DefinitionException("aspect " + name + " is not properly defined");
        }
        return index;
    }
View Full Code Here

        if (name == null) {
            throw new IllegalArgumentException("advice name can not be null");
        }
        final AdviceInfo index = (AdviceInfo) m_adviceIndexes.get(name);
        if (index == null) {
            throw new DefinitionException("advice " + name + " is not properly defined");
        }
        return index;
    }
View Full Code Here

        } else {
            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 String className = tokenizer.nextToken();
                try {
                    final Class modelClass = ContextClassLoader.loadClass(className);
                    ASPECT_MODELS[i] = (AspectModel) modelClass.newInstance();
                } catch (ClassNotFoundException e) {
                    throw new DefinitionException(
                            "aspect model implementation class not found [" +
                            className + "]: " + e.toString()
                    );
                } catch (Exception e) {
                    throw new DefinitionException(
                            "aspect model implementation class could not be instantiated [" +
                            className +
                            "] - make sure it has a default no argument constructor: " +
                            e.toString()
                    );
View Full Code Here

                    aspect, newAspectDef, systemDef, deploymentScope, deploymentHandle
            );

            redefine(newExpressions);
        } catch (DocumentException e) {
            throw new DefinitionException("XML definition for aspect is not well-formed: " + xmlDef);
        }
        return deploymentHandle;
    }
View Full Code Here

                                                         final Class aspectClass) {

        final Element aspect = document.getRootElement();

        if (!aspect.getName().equals("aspect")) {
            throw new DefinitionException("XML definition for aspect is not well-formed: " + document.asXML());
        }
        String specialAspectName = null;
        String className = null;
        String deploymentModelAsString = null;
        String containerClassName = null;
View Full Code Here

    private static SystemDefinition parseSystemElement(final ClassLoader loader,
                                                       final Element systemElement,
                                                       final String basePackage) {
        String uuid = systemElement.attributeValue("id");
        if ((uuid == null) || uuid.equals("")) {
            throw new DefinitionException("system UUID must be specified");
        }
        final SystemDefinition definition = new SystemDefinition(uuid);

        // add the virtual aspect
        addVirtualAspect(definition);
View Full Code Here

                            break;
                        }
                    }
                }
                if (method == null) {
                    throw new DefinitionException(
                            "could not find advice method [" + name + "] in [" + aspectClassInfo.getName() +
                            "] (are you using a compiler extension that you have not registered?)"
                    );
                }
                createAndAddAdviceDefsToAspectDef(type, bindTo, adviceName, method, aspectDef);
View Full Code Here

                // load the class info to determine if it is a pure interface introduction
                ClassInfo introductionClassInfo;
                try {
                    introductionClassInfo = AsmClassInfo.getClassInfo(fullClassName, loader);
                } catch (Exception e) {
                    throw new DefinitionException(
                            "could not find interface introduction: "
                            + packageName
                            + klass
                            + " "
                            + e.getMessage()
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.