Package org.qi4j.api.common

Examples of org.qi4j.api.common.AppliesToFilter


        return cl;
    }

    public boolean appliesTo( Class<?> fragmentClass, Method method, Class<?> compositeType, Class<?> mixinClass )
    {
        AppliesToFilter appliesToFilter = appliesToInstances.get( fragmentClass );
        if (appliesToFilter == null)
        {
            appliesToFilter = createAppliesToFilter( fragmentClass );
            appliesToInstances.put( fragmentClass, appliesToFilter );
        }

        return appliesToFilter.appliesTo( method, mixinClass, compositeType, fragmentClass );
    }
View Full Code Here


        return appliesToFilter.appliesTo( method, mixinClass, compositeType, fragmentClass );
    }

    public AppliesToFilter createAppliesToFilter( Class<?> fragmentClass )
    {
        AppliesToFilter result = null;
        if( !InvocationHandler.class.isAssignableFrom( fragmentClass ) )
        {
            result = new TypedFragmentAppliesToFilter();
            if( Modifier.isAbstract( fragmentClass.getModifiers() ) )
            {
View Full Code Here

    {
        AppliesTo appliesTo = modifierClass.getAnnotation( AppliesTo.class );
        if( appliesTo != null )
        {
            // Use "or" for all filters specified in the annotation
            AppliesToFilter appliesToAnnotation = null;
            for( Class<?> appliesToClass : appliesTo.value() )
            {
                AppliesToFilter filter;
                if( AppliesToFilter.class.isAssignableFrom( appliesToClass ) )
                {
                    try
                    {
                        filter = (AppliesToFilter) appliesToClass.newInstance();
View Full Code Here

        return cl;
    }

    public boolean appliesTo( Class<?> fragmentClass, Method method, Iterable<Class<?>> types, Class<?> mixinClass )
    {
        AppliesToFilter appliesToFilter = appliesToInstances.get( fragmentClass );
        if( appliesToFilter == null )
        {
            appliesToFilter = createAppliesToFilter( fragmentClass );
            appliesToInstances.put( fragmentClass, appliesToFilter );
        }
        for( Class<?> compositeType : types )
        {
            if( appliesToFilter.appliesTo( method, mixinClass, compositeType, fragmentClass ) )
            {
                return true;
            }
        }
        return false;
View Full Code Here

        return false;
    }

    public AppliesToFilter createAppliesToFilter( Class<?> fragmentClass )
    {
        AppliesToFilter result = null;
        if( !InvocationHandler.class.isAssignableFrom( fragmentClass ) )
        {
            result = new TypedFragmentAppliesToFilter();
            if( Modifier.isAbstract( fragmentClass.getModifiers() ) )
            {
View Full Code Here

    {
        AppliesTo appliesTo = modifierClass.getAnnotation( AppliesTo.class );
        if( appliesTo != null )
        {
            // Use "or" for all filters specified in the annotation
            AppliesToFilter appliesToAnnotation = null;
            for( Class<?> appliesToClass : appliesTo.value() )
            {
                AppliesToFilter filter;
                if( AppliesToFilter.class.isAssignableFrom( appliesToClass ) )
                {
                    try
                    {
                        filter = (AppliesToFilter) appliesToClass.newInstance();
View Full Code Here

TOP

Related Classes of org.qi4j.api.common.AppliesToFilter

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.