Package org.codehaus.aspectwerkz.exception

Examples of org.codehaus.aspectwerkz.exception.DefinitionException


        try {
            parseConstructorNamePattern(pattern);
            parserParameterTypesPattern(pattern);
        }
        catch (Throwable e) {
            throw new DefinitionException("method pattern is not well formed: " + pattern, e);
        }
    }
View Full Code Here


            Set set = new HashSet();
            set.addAll(expression.getTypes());
            return set;
        }
        else {
            throw new DefinitionException("No such registered expression: " + node.name + " in " + space.getNamespaceKey());
        }
    }
View Full Code Here

                    if (name != null) {
                        adviceName = name;
                    }
                    String expression = aroundAttr.getExpression();
                    if (expression == null || expression.equals("")) {
                        throw new DefinitionException(
                                "pointcut expression for advice [" + adviceName + "] is missing"
                        );
                    }
                    DefinitionParserHelper.createAndAddAroundAdviceDefToAspectDef(
                            expression, adviceName, aspectName,
                            aspectClassName, method, methodIndex,
                            aspectDef
                    );
                }
                else if (methodAttr instanceof BeforeAttribute) {
                    BeforeAttribute beforeAttr = (BeforeAttribute)methodAttr;
                    String name = beforeAttr.getName();
                    // custom name overrides the default one
                    if (name != null) {
                        adviceName = name;
                    }
                    String expression = beforeAttr.getExpression();
                    if (expression == null || expression.equals("")) {
                        throw new DefinitionException(
                                "pointcut expression for advice [" + adviceName + "] is missing"
                        );
                    }
                    DefinitionParserHelper.createAndAddBeforeAdviceDefToAspectDef(
                            expression, adviceName, aspectName,
                            aspectClassName, method, methodIndex,
                            aspectDef
                    );
                }
                else if (methodAttr instanceof AfterAttribute) {
                    AfterAttribute afterAttr = (AfterAttribute)methodAttr;
                    String name = afterAttr.getName();
                    // custom name overrides the default one
                    if (name != null) {
                        adviceName = name;
                    }
                    String expression = afterAttr.getExpression();
                    if (expression == null || expression.equals("")) {
                        throw new DefinitionException(
                                "pointcut expression for advice [" + adviceName + "] is missing"
                        );
                    }
                    DefinitionParserHelper.createAndAddAfterAdviceDefToAspectDef(
                            expression, adviceName, aspectName,
View Full Code Here

                                    m_mixins = new Mixin[m_mixins.length + 1];
                                    java.lang.System.arraycopy(tmpMixins, 0, m_mixins, 0, tmpMixins.length);
                                }
                            }
                            catch (Exception e) {
                                throw new DefinitionException(
                                        "could not register aspect [" + container.getCrossCuttingInfo().getName() +
                                        "] due to: " +
                                        e.toString()
                                );
                            }
View Full Code Here

            initialize();
            try {
                aspect = m_aspectContainers[index - 1];
            }
            catch (ArrayIndexOutOfBoundsException e1) {
                throw new DefinitionException("no aspect with index " + index);
            }
        }
        return aspect;
    }
View Full Code Here

            initialize();
            try {
                container = m_aspectContainers[m_aspectIndexes.get(name) - 1];
            }
            catch (ArrayIndexOutOfBoundsException e2) {
                throw new DefinitionException("container for cross-cutting class [" + name + "] is not properly defined");
            }
        }
        return container;
    }
View Full Code Here

            initialize();
            try {
                mixin = m_mixins[index - 1];
            }
            catch (ArrayIndexOutOfBoundsException e2) {
                throw new DefinitionException("no mixin with index " + index);
            }
        }
        return mixin;
    }
View Full Code Here

            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 IndexTuple index = (IndexTuple)m_adviceIndexes.get(name);
        if (index == null) {
            throw new DefinitionException("advice " + name + " is not properly defined");
        }
        return index;
    }
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.