Examples of ClassMethodInspector


Examples of org.drools.guvnor.server.util.ClassMethodInspector

            final Class type = inspector.getFieldTypes().get(field);
            final String fieldType = getFieldType(type);
            this.builder.addFieldType(shortTypeName + "." + field, fieldType);
        }
       
        ClassMethodInspector methodInspector = new ClassMethodInspector(clazz);
       
        this.builder.getInstance().addMethodInfo( shortTypeName, methodInspector.getMethodInfos() );
    }
View Full Code Here

Examples of org.drools.guvnor.server.util.ClassMethodInspector

            this.builder.addFieldType(shortTypeName + "." + field, fieldType);
            Field f = inspector.getFieldTypesField().get(field);
            this.builder.addFieldTypeField(shortTypeName + "." + field,f);
        }
       
        ClassMethodInspector methodInspector = new ClassMethodInspector(clazz);
       
        this.builder.getInstance().addMethodInfo( shortTypeName, methodInspector.getMethodInfos() );
    }
View Full Code Here

Examples of org.drools.ide.common.server.util.ClassMethodInspector

        this.builder.addFieldsForType( shortTypeName,
                                       fields.toArray( new String[fields.size()] ) );

        //Methods for use in ActionCallMethod's
        ClassMethodInspector methodInspector = new ClassMethodInspector( clazz,
                                                                         this );

        List<MethodInfo> methodInfos = methodInspector.getMethodInfos();
        for ( MethodInfo mi : methodInfos ) {
            String genericType = mi.getParametricReturnType();
            if ( genericType != null ) {
                this.builder.putParametricFieldType( shortTypeName + "." + mi.getNameWithParameters(),
                                                     genericType );
View Full Code Here

Examples of org.drools.ide.common.server.util.ClassMethodInspector

        this.builder.addFieldsForType( shortTypeName,
                                       fields.toArray( new String[fields.size()] ) );

        //Methods for use in ActionCallMethod's
        ClassMethodInspector methodInspector = new ClassMethodInspector( clazz,
                                                                         this );

        List<MethodInfo> methodInfos = methodInspector.getMethodInfos();
        for ( MethodInfo mi : methodInfos ) {
            String genericType = mi.getParametricReturnType();
            if ( genericType != null ) {
                this.builder.putParametricFieldType( shortTypeName + "." + mi.getNameWithParameters(),
                                                     genericType );
View Full Code Here

Examples of org.drools.ide.common.server.util.ClassMethodInspector

            Field f = inspector.getFieldTypesField().get( field );
            this.builder.addFieldTypeField( shortTypeName + "." + field,
                                            f );
        }

        ClassMethodInspector methodInspector = new ClassMethodInspector( clazz,
                                                                         this );

        List<MethodInfo> methodInfos = methodInspector.getMethodInfos();
        for ( MethodInfo mi : methodInfos ) {
            String genericType = mi.getParametricReturnType();
            if ( genericType != null ) {
                this.builder.putParametricFieldType( shortTypeName + "." + mi.getNameWithParameters(),
                                                     genericType );
View Full Code Here

Examples of org.drools.ide.common.server.util.ClassMethodInspector

            Field f = inspector.getFieldTypesField().get( field );
            this.builder.addFieldTypeField( shortTypeName + "." + field,
                                            f );
        }

        ClassMethodInspector methodInspector = new ClassMethodInspector( clazz,
                                                                         this );

        List<MethodInfo> methodInfos = methodInspector.getMethodInfos();
        for ( MethodInfo mi : methodInfos ) {
            String genericType = mi.getParametricReturnType();
            if ( genericType != null ) {
                this.builder.putParametricFieldType( shortTypeName + "." + mi.getNameWithParameters(),
                                                     genericType );
View Full Code Here

Examples of org.drools.ide.common.server.util.ClassMethodInspector

*/
public class ClassMethodInspectorTest {

    @Test
    public void testSimpleMethods() throws Exception {
        final ClassMethodInspector ext = new ClassMethodInspector( SimpleMethods.class, new Converter() );

        for ( String s : ext.getMethodNames() ) {
            assertFalse( "Method " + s + " is not allowed.",
                         allowedMethod( s ) );
        }
    }
View Full Code Here

Examples of org.drools.ide.common.server.util.ClassMethodInspector

        }
    }

    @Test
    public void testMoreThanOneMethodWithTheSameName() throws Exception {
        final ClassMethodInspector ext = new ClassMethodInspector( MoreThanOneMethodWithTheSameName.class, new Converter() );

        for ( String s : ext.getMethodNames() ) {
            assertFalse( "Method " + s + " is not allowed.",
                         allowedMethod( s ) );
        }

    }
View Full Code Here

Examples of org.drools.ide.common.server.util.ClassMethodInspector

    }

    @Test
    public void testCollection() throws Exception {
        final ClassMethodInspector ext = new ClassMethodInspector( Collection.class, new Converter() );

        for ( String s : ext.getMethodNames() ) {
            assertFalse( "Method " + s + " is not allowed.",
                         allowedMethod( s ) );
        }
    }
View Full Code Here

Examples of org.drools.ide.common.server.util.ClassMethodInspector

        }
    }

    @Test
    public void testArrayList() throws Exception {
        final ClassMethodInspector ext = new ClassMethodInspector( ArrayList.class, new Converter() );

        for ( String s : ext.getMethodNames() ) {
            assertFalse( "Method " + s + " is not allowed.",
                         allowedMethod( s ) );
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.