Package org.codehaus.aspectwerkz.exception

Examples of org.codehaus.aspectwerkz.exception.DefinitionException


     */
    public int getAdviceIndexFor(final String name) {
        if (name == null) throw new IllegalArgumentException("advice name can not be null");

        final int index = m_adviceIndexes.get(name);
        if (index == 0) throw new DefinitionException("advice " + name + " is not properly defined (this also occurs if you have introductions defined in your definition but have not specified a meta-data dir for the pre-compiled definition)");
        return index;
    }
View Full Code Here


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

            initialize();
            try {
                advice = m_advices[m_adviceIndexes.get(name) - 1];
            }
            catch (ArrayIndexOutOfBoundsException e2) {
                throw new DefinitionException("advice " + name + " is not properly defined");
            }
        }
        return advice;
    }
View Full Code Here

     */
    public int getIntroductionIndex(final String name) {
        if (name == null) throw new IllegalArgumentException("introduction name can not be null");

        final int index = m_definition.getIntroductionIndex(name);
        if (index == 0) throw new DefinitionException("introduction " + name + " is not properly defined");
        return index;
    }
View Full Code Here

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

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

                }

                String exceptionClassPattern = throwsTags[j].getNamedParameter("exception");

                if (exceptionClassPattern == null) {
                    throw new DefinitionException("exception class not specified for throws attribute at method <" + javaMethods[i].getName() + ">");
                }

                String[] attributes = throwsTags[j].getParameters();
                for (int k = 0; k < attributes.length; k++) {
                    String attribute = attributes[k];
View Full Code Here

                if (callerSideTags[j] == null) {
                    continue;
                }
                String callerClassPattern = callerSideTags[j].getNamedParameter("callerclass");
                if (callerClassPattern == null) {
                    throw new DefinitionException("caller class not specified for caller side attribute at method <" + javaMethods[i].getName() + ">");
                }

                String[] callerSideAttributes = callerSideTags[j].getParameters();
                for (int k = 0; k < callerSideAttributes.length; k++) {
                    String attribute = callerSideAttributes[k];
View Full Code Here

                for (int i = 0; i < interfaces.length; i++) {
                    if (interfaces[i].getName().equals(m_interface)) {
                        implementsInterface = true;
                    }
                }
                if (!implementsInterface) throw new DefinitionException("introduced implementation " + m_implementation + " has to implement introduced interface " + m_interface);
            }
            catch (Exception e) {
                throw new WrappedRuntimeException(e);
            }
        }
View Full Code Here

    /**
     * Checks if the implementation class implementents the correct interface.
     */
    private void checkIfInterfaceImplementationMatches() {
        if (!findInterface(m_implClass, m_interface)) {
            throw new DefinitionException("introduced implementation " + m_implementation + " has to implement introduced interface " + m_interface);
        }
    }
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.