Package org.jboss.weld.exceptions

Examples of org.jboss.weld.exceptions.IllegalStateException


    protected static Type getFacadeType(InjectionPoint injectionPoint) {
        Type genericType = injectionPoint.getType();
        if (genericType instanceof ParameterizedType) {
            return ((ParameterizedType) genericType).getActualTypeArguments()[0];
        } else {
            throw new IllegalStateException(BeanLogger.LOG.typeParameterMustBeConcrete(injectionPoint));
        }
    }
View Full Code Here


        } finally {
            if (beansXmlInputStream != null) {
                try {
                    beansXmlInputStream.close();
                } catch (IOException e) {
                    throw new IllegalStateException(e);
                }
            }
        }
    }
View Full Code Here

     * @throws IllegalStateException If the index is built already
     */
    public void build(Set<Bean<?>> beans) {

        if (isBuilt()) {
            throw new IllegalStateException("BeanIdentifier index is already built!");
        }

        if (beans.isEmpty()) {
            index = new BeanIdentifier[0];
            reverseIndex = Collections.emptyMap();
View Full Code Here

        index = null;
    }

    private void checkIsBuilt() {
        if (!isBuilt()) {
            throw new IllegalStateException("BeanIdentifier index not built!");
        }
    }
View Full Code Here

            return new StringBeanIdentifier(deprefixed.substring(FALLBACK_FLAG.length()));
        }
        try {
            return index.getIdentifier(Integer.parseInt(deprefixed));
        } catch (NumberFormatException e) {
            throw new IllegalStateException("Unable to deprefix id:" + id, e);
        }
    }
View Full Code Here

            return beanManager.createEnhancedAnnotatedType((Class<?>) type);
        }
        if (type instanceof ParameterizedType && (((ParameterizedType) type).getRawType() instanceof Class)) {
            return beanManager.createEnhancedAnnotatedType((Class<?>) ((ParameterizedType) type).getRawType());
        }
        throw new IllegalStateException(BeanLogger.LOG.unableToProcess(type));
    }
View Full Code Here

TOP

Related Classes of org.jboss.weld.exceptions.IllegalStateException

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.