Package org.kie.api.definition.type

Examples of org.kie.api.definition.type.Role


        boolean propertyReactive = propertySpecificOption.isPropSpecific(cls.isAnnotationPresent(PropertyReactive.class),
                                                                         cls.isAnnotationPresent(ClassReactive.class));

        kbuilder.setPropertyReactive( null, typeDeclaration, propertyReactive );

        Role role = cls.getAnnotation(Role.class);
        if (role != null && role.value() == Role.Type.EVENT) {
            typeDeclaration.setRole(TypeDeclaration.Role.EVENT);
        }

        return typeDeclaration;
    }
View Full Code Here


        boolean propertyReactive = propertySpecificOption.isPropSpecific(cls.isAnnotationPresent(PropertyReactive.class),
                cls.isAnnotationPresent(ClassReactive.class));

        setPropertyReactive(null, typeDeclaration, propertyReactive);

        Role role = cls.getAnnotation(Role.class);
        if (role != null && role.value() == Role.Type.EVENT) {
            typeDeclaration.setRole(TypeDeclaration.Role.EVENT);
        }

        return typeDeclaration;
    }
View Full Code Here

        boolean propertyReactive = propertySpecificOption.isPropSpecific( cls.isAnnotationPresent( PropertyReactive.class ),
                                                                          cls.isAnnotationPresent( ClassReactive.class ) );

        setPropertyReactive( null, typeDeclaration, propertyReactive );

        Role role = cls.getAnnotation( Role.class );
        if ( role != null && role.value() == Role.Type.EVENT) {
            typeDeclaration.setRole(TypeDeclaration.Role.EVENT);
        }

        return typeDeclaration;
    }
View Full Code Here

    public boolean isEvent( Class clazz ) {
        TypeDeclaration typeDeclaration = getTypeDeclaration(clazz);
        if (typeDeclaration != null) {
            return typeDeclaration.getRole() == TypeDeclaration.Role.EVENT;
        }
        Role role = (Role) clazz.getAnnotation( Role.class );
        return role != null && role.value() == Role.Type.EVENT;
    }
View Full Code Here

    public boolean isEvent( Class clazz ) {
        TypeDeclaration typeDeclaration = getTypeDeclaration(clazz);
        if (typeDeclaration != null) {
            return typeDeclaration.getRole() == TypeDeclaration.Role.EVENT;
        }
        Role role = (Role) clazz.getAnnotation( Role.class );
        return role != null && role.value() == Role.Type.EVENT;
    }
View Full Code Here

    public boolean isEvent( Class clazz ) {
        TypeDeclaration typeDeclaration = getTypeDeclaration(clazz);
        if (typeDeclaration != null) {
            return typeDeclaration.getRole() == Role.Type.EVENT;
        }
        Role role = (Role) clazz.getAnnotation( Role.class );
        return role != null && role.value() == Role.Type.EVENT;
    }
View Full Code Here

    }


    private void processTypeAnnotations( AbstractClassTypeDeclarationDescr typeDescr, TypeDeclaration type, TypeDeclaration parent ) {
        try {
            Role role = typeDescr.getTypedAnnotation(Role.class);
            if (role != null) {
                type.setRole(role.value());
            }

            TypeSafe typeSafe = typeDescr.getTypedAnnotation(TypeSafe.class);
            if (typeSafe != null) {
                type.setTypesafe(typeSafe.value());
View Full Code Here

        TypeMetaInfo beanTypeInfo = kieModuleMetaData.getTypeMetaInfo( beanClass );
        assertNotNull( beanTypeInfo );

        assertTrue( beanTypeInfo.isEvent() );

        Role role = beanClass.getAnnotation( Role.class );
        assertNotNull( role );
        assertEquals( Role.Type.EVENT, role.value() );

        assertEquals( useTypeDeclaration, beanTypeInfo.isDeclaredType() );
    }
View Full Code Here

        PropertySpecificOption propertySpecificOption = kbuilder.getBuilderConfiguration().getPropertySpecificOption();
        boolean propertyReactive = propertySpecificOption.isPropSpecific(cls.isAnnotationPresent(PropertyReactive.class),
                                                                         cls.isAnnotationPresent(ClassReactive.class));
        typeDeclaration.setPropertyReactive(propertyReactive);

        Role role = cls.getAnnotation(Role.class);
        if (role != null) {
            typeDeclaration.setRole(role.value());
        }

        return typeDeclaration;
    }
View Full Code Here

        this.isDeclaredType = !typeDeclaration.isJavaBased();
    }

    public TypeMetaInfo(Class<?> clazz) {
        this.kind = TypeDeclaration.Kind.CLASS;
        Role role = clazz.getAnnotation(Role.class);
        this.role = role == null ? Role.Type.FACT : role.value();
        this.isDeclaredType = false;
    }
View Full Code Here

TOP

Related Classes of org.kie.api.definition.type.Role

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.