Package org.codehaus.aspectwerkz.joinpoint

Examples of org.codehaus.aspectwerkz.joinpoint.MethodSignature


     */

    public void invocationCounter(final JoinPoint joinPoint) throws Throwable {

        MethodSignature signature = (MethodSignature) joinPoint.getSignature();

        CacheStatistics.addMethodInvocation(signature.getName(), signature.getParameterTypes());

    }
View Full Code Here


    /**
     * @Before call(int examples.caching.Pi.getPiDecimal(int)) && withincode(int
     *         examples.caching.main(String[]))
     */
    public void invocationCounter(final JoinPoint joinPoint) throws Throwable {
        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
        CacheStatistics.addMethodInvocation(signature.getName(), signature.getParameterTypes());
    }
View Full Code Here

     * Creates meta-data for the class. Note: we use a contextual class loader to access the Class object
     *
     * @return the created class meta-data
     */
    private static ClassMetaData createClassMetaData(final JoinPoint joinPoint) {
        MethodSignature signature = (MethodSignature)joinPoint.getSignature();
        return ReflectionMetaDataMaker.createClassMetaData(signature.getDeclaringType());
    }
View Full Code Here

     * Creates meta-data for the method.
     *
     * @return the created method meta-data
     */
    private static MethodMetaData createMethodMetaData(final JoinPoint joinPoint) {
        MethodSignature signature = (MethodSignature)joinPoint.getSignature();
        return ReflectionMetaDataMaker.createMethodMetaData(
                signature.getName(),
                signature.getParameterTypes(),
                signature.getReturnType()
        );
    }
View Full Code Here

    /**
     * @Before call(examples.caching.*->int examples.caching.Pi.getPiDecimal(int))
     */
    public void invocationCounter(final JoinPoint joinPoint) throws Throwable {
        MethodSignature signature = (MethodSignature)joinPoint.getSignature();
        CacheStatistics.addMethodInvocation(
                signature.getName(),
                signature.getParameterTypes()
        );
    }
View Full Code Here

    /**
     * @Before call(int examples.caching.Pi.getPiDecimal(int)) && withincode(int
     * examples.caching.main(String[]))
     */
    public void invocationCounter(final JoinPoint joinPoint) throws Throwable {
        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
        CacheStatistics.addMethodInvocation(signature.getName(), signature.getParameterTypes());
    }
View Full Code Here

     * @throws Throwable
     */
    @Before(TRANSACTED_METHODS_POINTCUT)
    public void enterTransactedMethod(final StaticJoinPoint jp) throws Throwable {

        final MethodSignature sig = (MethodSignature)jp.getSignature();
        final Class declaringType = sig.getDeclaringType();        final Method method = sig.getMethod();
        final TransactionAttributeType txType = getTransactionAttributeTypeFor(declaringType, method);

        final TransactionManager tm = getTransactionManager();

        switch(txType) {
View Full Code Here

     * Creates meta-data for the class. Note: we use a contextual class loader to access the Class object
     *
     * @return the created class meta-data
     */
    private static ClassMetaData createClassMetaData(final JoinPoint joinPoint) {
        MethodSignature signature = (MethodSignature)joinPoint.getSignature();
        return ReflectionMetaDataMaker.createClassMetaData(signature.getDeclaringType());
    }
View Full Code Here

     * Creates meta-data for the method.
     *
     * @return the created method meta-data
     */
    private static MethodMetaData createMethodMetaData(final JoinPoint joinPoint) {
        MethodSignature signature = (MethodSignature)joinPoint.getSignature();
        return ReflectionMetaDataMaker.createMethodMetaData(
                signature.getName(),
                signature.getParameterTypes(),
                signature.getReturnType()
        );
    }
View Full Code Here

    /**
     * @Around pc10
     */
    public Object advice4(final JoinPoint joinPoint) throws Throwable {
        final Object result = joinPoint.proceed();
        MethodSignature signature = (MethodSignature)joinPoint.getSignature();
        String metadata =
                joinPoint.getTargetClass().getName() +
                signature.getMethod().getName() +
                joinPoint.getTargetInstance().hashCode() +
                signature.getParameterValues()[0] +
                signature.getParameterTypes()[0].getName() +
                signature.getReturnType().getName() +
                signature.getReturnValue();
        return metadata;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.joinpoint.MethodSignature

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.