Package javax.lang.model.type

Examples of javax.lang.model.type.MirroredTypeException


                   obj instanceof MirroredTypeExceptionProxy &&
                   type.equals(((MirroredTypeExceptionProxy) obj).type);
        }

        protected RuntimeException generateException() {
            return new MirroredTypeException(type);
        }
View Full Code Here


    }
    else if (Class.class.equals(expectedType)) {
      // package the Class-valued return as a MirroredTypeException
      if (actualValue instanceof TypeBinding) {
        TypeMirror mirror = _env.getFactory().newTypeMirror((TypeBinding)actualValue);
        throw new MirroredTypeException(mirror);
      }
      else {
        // TODO: actual value is not a TypeBinding.  Should we return a TypeMirror around an ErrorType?
        return null;
      }
View Full Code Here

    }
    else if (Class.class.equals(expectedType)) {
      // package the Class-valued return as a MirroredTypeException
      if (actualValue instanceof TypeBinding) {
        TypeMirror mirror = _env.getFactory().newTypeMirror((TypeBinding)actualValue);
        throw new MirroredTypeException(mirror);
      }
      else {
        // TODO: actual value is not a TypeBinding.  Should we return a TypeMirror around an ErrorType?
        return null;
      }
View Full Code Here

                   obj instanceof MirroredTypeExceptionProxy &&
                   type.equals(((MirroredTypeExceptionProxy) obj).type);
        }

        protected RuntimeException generateException() {
            return new MirroredTypeException(type);
        }
View Full Code Here

       obj instanceof MirroredTypeExceptionProxy &&
       type.equals(((MirroredTypeExceptionProxy) obj).type);
  }

  protected RuntimeException generateException() {
      return new MirroredTypeException(type);
  }
View Full Code Here

       obj instanceof MirroredTypeExceptionProxy &&
       type.equals(((MirroredTypeExceptionProxy) obj).type);
  }

  protected RuntimeException generateException() {
      return new MirroredTypeException(type);
  }
View Full Code Here

            throw new IllegalStateException("should throw a MirroredTypeException");
        } catch (IllegalAccessException e) {
            throw new IllegalAccessError(e.getMessage());
        } catch (InvocationTargetException e) {
            if( e.getCause() instanceof MirroredTypeException ) {
                MirroredTypeException me = (MirroredTypeException)e.getCause();
                return me.getTypeMirror();
            }
            // impossible
            throw new RuntimeException(e);
        } catch (NoSuchMethodException e) {
            throw new NoSuchMethodError(e.getMessage());
View Full Code Here

                return r.toArray(new TypeMirror[r.size()]);
            }
            // *********************** TODO: jdk6 bug. Fixed in java7
            // According to the javadocs it should throw the MirroredTypesException
            if( e.getCause() instanceof MirroredTypeException ) {
                MirroredTypeException me = (MirroredTypeException)e.getCause();
                TypeMirror tr = me.getTypeMirror();
                TypeMirror[] trArr = new TypeMirror[1];
                trArr[0] = tr;
                return trArr;
            }
            // *******************************************
 
View Full Code Here

TOP

Related Classes of javax.lang.model.type.MirroredTypeException

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.