Package org.drools.workbench.models.datamodel.oracle

Examples of org.drools.workbench.models.datamodel.oracle.MethodInfo


                " then\n" +
                "end";

        final HashMap<String, List<MethodInfo>> map = new HashMap<String, List<MethodInfo>>();
        final ArrayList<MethodInfo> methodInfos = new ArrayList<MethodInfo>();
        methodInfos.add( new MethodInfo( "intValue",
                                         Collections.EMPTY_LIST,
                                         "int",
                                         null,
                                         DataType.TYPE_NUMERIC_INTEGER ) );
        map.put( "java.lang.Number",
View Full Code Here


                " then\n" +
                "end";

        final HashMap<String, List<MethodInfo>> map = new HashMap<String, List<MethodInfo>>();
        final ArrayList<MethodInfo> methodInfos = new ArrayList<MethodInfo>();
        methodInfos.add( new MethodInfo( "intValue",
                                         Collections.EMPTY_LIST,
                                         "int",
                                         null,
                                         DataType.TYPE_NUMERIC_INTEGER ) );
        map.put( "java.lang.Number",
View Full Code Here

    }

    private String getDataType( String param ) {
        String dataType;

        MethodInfo methodInfo = getMethodInfo();

        if ( methodInfo != null ) {
            dataType = methodInfo.getParams().get( index++ );
        } else {
            dataType = boundParams.get( param );
        }
        if ( dataType == null ) {
            dataType = inferDataType( param,
View Full Code Here

                                acm.setVariable( variable );
                                acm.setState( 1 );
                                m.addRhsItem( acm );
                                String[] params = unwrapParenthesis( line ).split( "," );

                                MethodInfo methodInfo = null;
                                String variableType = boundParams.get( variable );
                                if ( variableType != null ) {
                                    List<MethodInfo> methods = getMethodInfosForType( m, dmo, variableType );
                                    if ( methods != null ) {
                                        for ( MethodInfo method : methods ) {
                                            if ( method.getName().equals( methodName ) && method.getParams().size() == params.length ) {
                                                methodInfo = method;
                                                break;
                                            }
                                        }
                                    }
                                }

                                int i = 0;
                                for ( String param : params ) {
                                    param = param.trim();
                                    if ( param.length() == 0 ) {
                                        continue;
                                    }
                                    String dataType = methodInfo == null ?
                                            inferDataType( param, isJavaDialect ) :
                                            methodInfo.getParams().get( i++ );
                                    ActionFieldFunction actionFiled = new ActionFieldFunction( null, adjustParam( dataType, param, isJavaDialect ), dataType );
                                    actionFiled.setNature( inferFieldNature( param, boundParams ) );
                                    acm.addFieldValue( actionFiled );
                                }
                            }
View Full Code Here

                                                              final String fieldName = field.getName();
                                                              if ( !isNested || !fieldName.equals( DataType.TYPE_THIS ) ) {

                                                                  boolean changed = false;
                                                                  for ( Iterator<MethodInfo> i = methodInfos.iterator(); i.hasNext(); ) {
                                                                      final MethodInfo methodInfo = i.next();
                                                                      final String methodName = methodInfo.getName();
                                                                      if ( methodName.startsWith( fieldName ) ) {
                                                                          completions.put( methodName,
                                                                                           METHOD_VALUE_PREFIX + "." + methodName );
                                                                          i.remove();
                                                                          changed = true;
View Full Code Here

                                       final String name,
                                       final List<String> params,
                                       final String returnType,
                                       final String parametricReturnType,
                                       final String genericType ) {
        MethodInfo mi = new MethodInfo( name,
                                        params,
                                        returnType,
                                        parametricReturnType,
                                        genericType );
View Full Code Here

                "    m.put(\"key\", a );\n" +
                "end\n";

        Map<String, List<MethodInfo>> methodInformation = new HashMap<String, List<MethodInfo>>();
        List<MethodInfo> mapMethodInformation = new ArrayList<MethodInfo>();
        mapMethodInformation.add( new MethodInfo( "put",
                                                  Arrays.asList( new String[]{ "java.lang.Object", "java.lang.Object" } ),
                                                  "void",
                                                  "void",
                                                  "java.util.Map" ) );
View Full Code Here

                "    t.doSomething( 1 * 2 );\n" +
                "end\n";

        Map<String, List<MethodInfo>> methodInformation = new HashMap<String, List<MethodInfo>>();
        List<MethodInfo> mapMethodInformation = new ArrayList<MethodInfo>();
        mapMethodInformation.add( new MethodInfo( "doSomething",
                                                  Arrays.asList( new String[]{ DataType.TYPE_NUMERIC_INTEGER } ),
                                                  "void",
                                                  "void",
                                                  "org.mortgages.MyType" ) );

View Full Code Here

                "    t.doSomething( i );\n" +
                "end\n";

        Map<String, List<MethodInfo>> methodInformation = new HashMap<String, List<MethodInfo>>();
        List<MethodInfo> mapMethodInformation = new ArrayList<MethodInfo>();
        mapMethodInformation.add( new MethodInfo( "doSomething",
                                                  Arrays.asList( new String[]{ DataType.TYPE_NUMERIC_INTEGER } ),
                                                  "void",
                                                  "void",
                                                  "org.mortgages.MyType" ) );
View Full Code Here

                        + "  s.indexOf( 0 );\n"
                        + "end\n";

        Map<String, List<MethodInfo>> methodInformation = new HashMap<String, List<MethodInfo>>();
        List<MethodInfo> mapMethodInformation = new ArrayList<MethodInfo>();
        mapMethodInformation.add( new MethodInfo( "indexOf",
                                                  Arrays.asList( new String[]{ "String" } ),
                                                  "int",
                                                  null,
                                                  "String" ) );
        mapMethodInformation.add( new MethodInfo( "indexOf",
                                                  Arrays.asList( new String[]{ "Integer" } ),
                                                  "int",
                                                  null,
                                                  "String" ) );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.oracle.MethodInfo

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.