Package org.drools.core

Examples of org.drools.core.RuntimeDroolsException


        } else if ( "short".equals( type ) ) {
            return "java.lang.Short";
        } else if ( "boolean".equals( type ) ) {
            return "java.lang.Boolean";
        } else {
            throw new RuntimeDroolsException("Unable to recognize primitive type " + type);
        }
    }
View Full Code Here


        } else if ( "java.lang.Long".equals( type ) || "Long".equals( type )) {
            return "longValue";
        } else if ( "java.lang.Short".equals( type ) || "Short".equals( type )) {
            return "shortValue";
        } else {
            throw new RuntimeDroolsException("Not a numeric type " + type);
        }

    }
View Full Code Here

            } else if ( "short".equals( type ) ) {
                return "writeShort";
            } else if ( "boolean".equals( type ) ) {
                return "writeBoolean";
            } else {
                throw new RuntimeDroolsException( "No serialization method found for " + type );
            }
        } else {
            return "writeObject";
        }
    }
View Full Code Here

                } else if ( "short".equals( type ) ) {
                    return "readShort";
                } else if ( "boolean".equals( type ) ) {
                    return "readBoolean";
                } else {
                    throw new RuntimeDroolsException( "No serialization method found for " + type );
                }
            } else {
                return "readObject";
            }
        }
View Full Code Here

                result = Long.MAX_VALUE;
            } else if( "-*".equals( trimmed ) ) {
                // negative infinity
                result = Long.MIN_VALUE;
            } else {
                throw new RuntimeDroolsException( "Error parsing time string: [ " + time + " ]" );
            }
        }
        return result;
    }
View Full Code Here

                    return (BaseClassFieldReader) newClass.getConstructors()[0].newInstance( params );
                } else if ( fieldType != null ) {
                    // must be a public field
                    return null;
                } else {
                    throw new RuntimeDroolsException( "Field/method '" + fieldName + "' not found for class '" + clazz.getName() + "'\n" );
                }
            }
        } catch ( final RuntimeDroolsException e ) {
            throw e;
        } catch ( final Exception e ) {
            throw new RuntimeDroolsException( e );
        }
    }
View Full Code Here

                        // public field
                        return null;
                    }

                } else {
                    throw new RuntimeDroolsException( "Field/method '" + fieldName + "' not found for class '" + clazz.getName() + "'" );
                }
            }
        } catch ( final RuntimeDroolsException e ) {
            throw e;
        } catch ( final Exception e ) {
            throw new RuntimeDroolsException( e );
        }
    }
View Full Code Here

        Method overridingMethod;
        try {
            overridingMethod = superClass.getMethod( getOverridingGetMethodName( fieldType ),
                                                     new Class[]{InternalWorkingMemory.class, Object.class} );
        } catch ( final Exception e ) {
            throw new RuntimeDroolsException( "This is a bug. Please report back to JBoss Rules team.",
                                              e );
        }
        final MethodVisitor mv = cw.visitMethod( Opcodes.ACC_PUBLIC,
                                                 overridingMethod.getName(),
                                                 Type.getMethodDescriptor( overridingMethod ),
View Full Code Here

            Method overridingMethod;
            try {
                overridingMethod = superClass.getMethod( getOverridingSetMethodName( fieldType ),
                                                         new Class[]{Object.class, fieldType.isPrimitive() ? fieldType : Object.class} );
            } catch ( final Exception e ) {
                throw new RuntimeDroolsException( "This is a bug. Please report back to JBoss Rules team.",
                                                  e );
            }

            mv = cw.visitMethod( Opcodes.ACC_PUBLIC,
                                 overridingMethod.getName(),
View Full Code Here

    public Class getClass(String className) {
        try {
            return this.classLoader.loadClass( className );
        } catch ( ClassNotFoundException e ) {
            throw new RuntimeDroolsException( "Unable to resolve class '" + className + "'" );
        }
    }
View Full Code Here

TOP

Related Classes of org.drools.core.RuntimeDroolsException

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.