Package org.jrebirth.af.core.exception

Examples of org.jrebirth.af.core.exception.CoreException


            final Class<?> eventClass = getAnnotationApiEventClass();

            try {
                this.callbackObject.getClass().getDeclaredMethod(methodName, eventClass);
            } catch (NoSuchMethodException | SecurityException e) {
                throw new CoreException(NO_EVENT_CALLBACK.getText(this.callbackObject.getClass().getName(), methodName, eventClass.getName()), e);
            }
        }

    }
View Full Code Here


    public <R> R buildComponent(final Class<R> clazz) throws CoreException {

        try {
            return clazz.newInstance();
        } catch (InstantiationException | IllegalAccessException e) {
            throw new CoreException(COMPONENT_BUILD_ERROR.getText(clazz.getName()), e);
        }
    }
View Full Code Here

            notifyPreloader(new ProgressNotification(1000));
            notifyPreloader(new ProgressNotification(1.0));

        } catch (final Exception e) {
            LOGGER.error(ApplicationMessages.INIT_ERROR, e, this.getClass().getSimpleName());
            throw new CoreException(e);
        }
    }
View Full Code Here

            LOGGER.log(STARTED_SUCCESSFULLY, this.getClass().getSimpleName());

        } catch (final CoreException ce) {
            LOGGER.error(START_ERROR, ce, this.getClass().getSimpleName());
            throw new CoreException(ce);
        }
    }
View Full Code Here

            LOGGER.log(STOPPED_SUCCESSFULLY, this.getClass().getSimpleName());

        } catch (final Exception e) {
            LOGGER.error(STOP_ERROR, e, this.getClass().getSimpleName());
            throw new CoreException(e);
        }
    }
View Full Code Here

                for (int i = 0; i < parameterTypes.length; i++) {
                    LOGGER.log(ARGUMENT_DETAIL, parameterTypes[i].toString(), parameters[i].toString());
                }
            }
            if (genericClass == null) {
                throw new CoreException(GENERIC_TYPE_ERROR_1.getText(sb.toString(), mainClass.getName()), e);
            } else {
                throw new CoreException(GENERIC_TYPE_ERROR_2.getText(genericClass.getName(), mainClass.getName()), e);
            }
        }
    }
View Full Code Here

            // Reset default visibility
            method.setAccessible(accessible);

        } catch (IllegalAccessException | InvocationTargetException | IllegalArgumentException e) {
            throw new CoreException(e);
        }
        return res;
    }
View Full Code Here

            // Reset default visibility
            field.setAccessible(accessible);

        } catch (IllegalAccessException | IllegalArgumentException e) {
            throw new CoreException(e);
        }
    }
View Full Code Here

    private <E extends Event> EventHandler<E> wrapbuildHandler(final EventAdapter eventAdapter, final Class<? extends EventAdapter> adapterClass, final Class<? extends EventHandler<E>> handlerClass)
            throws CoreException {
        try {
            return handlerClass.getDeclaredConstructor(adapterClass).newInstance(eventAdapter);
        } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) {
            throw new CoreException("Impossible to build event handler " + handlerClass.getName() + " for the class " + this.getClass().getName(), e);
        }
    }
View Full Code Here

        EventHandler<E> eventHandler = null;
        // Build the mouse handler instance
        if (adapterClass.isAssignableFrom(this.getClass())) {
            eventHandler = wrapbuildHandler(this, adapterClass, handlerClass);
        } else {
            throw new CoreException(this.getClass().getName() + " must implement " + adapterClass.getName() + " interface");
        }
        return eventHandler;
    }
View Full Code Here

TOP

Related Classes of org.jrebirth.af.core.exception.CoreException

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.