Package com.github.sviperll.adt4j.model.util

Examples of com.github.sviperll.adt4j.model.util.RuntimeProcessingException


                public AbstractJType visitArray(ArrayType t, Void p) {
                    try {
                        AbstractJType componentType = toJType(t.getComponentType(), environment);
                        return componentType.array();
                    } catch (ProcessingException ex) {
                        throw new RuntimeProcessingException(ex);
                    }
                }

                @Override
                public AbstractJType visitDeclared(DeclaredType t, Void p) {
                    try {
                        TypeElement element = (TypeElement)t.asElement();
                        AbstractJClass _class = ref(element);
                        for (TypeMirror typeArgument: t.getTypeArguments()) {
                            _class = _class.narrow(toJType(typeArgument, environment));
                        }
                        return _class;
                    } catch (ProcessingException ex) {
                        throw new RuntimeProcessingException(ex);
                    }
                }

                @Override
                public AbstractJType visitError(ErrorType t, Void p) {
                    try {
                        throw new ErrorTypeFound();
                    } catch (ProcessingException ex) {
                        throw new RuntimeProcessingException(ex);
                    }
                }

                @Override
                public AbstractJType visitTypeVariable(TypeVariable t, Void p) {
                    return environment.get(t.asElement().getSimpleName().toString());
                }

                @Override
                public AbstractJType visitWildcard(WildcardType t, Void p) {
                    try {
                        TypeMirror extendsBoundMirror = t.getExtendsBound();
                        if (extendsBoundMirror != null) {
                            AbstractJClass extendsBound = (AbstractJClass)toJType(extendsBoundMirror, environment);
                            return extendsBound.wildcard(JTypeWildcard.EBoundMode.EXTENDS);
                        }
                        TypeMirror superBoundMirror = t.getSuperBound();
                        if (superBoundMirror != null) {
                            AbstractJClass superBound = (AbstractJClass)toJType(superBoundMirror, environment);
                            return superBound.wildcard(JTypeWildcard.EBoundMode.SUPER);
                        }
                        return codeModel.wildcard();
                    } catch (ProcessingException ex) {
                        throw new RuntimeProcessingException(ex);
                    }
                }

                @Override
                public AbstractJType visitExecutable(ExecutableType t, Void p) {
View Full Code Here

TOP

Related Classes of com.github.sviperll.adt4j.model.util.RuntimeProcessingException

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.