Package com.sun.mirror.type

Examples of com.sun.mirror.type.TypeMirror


                defaultNamespaceRemap );

        builder.setErrorHandler(new ErrorHandlerImpl(env.getMessager()));

        for( Reference ref : rootClasses ) {
            TypeMirror t = ref.type;

            XmlJavaTypeAdapter xjta = ref.annotations.getAnnotation(XmlJavaTypeAdapter.class);
            XmlList xl = ref.annotations.getAnnotation(XmlList.class);

            builder.getTypeInfo(new Ref<TypeMirror,TypeDeclaration>(builder,t,xjta,xl));
View Full Code Here


        public String toString() {
            return ex.getQualifiedName();
        }

        public int hashCode() {
            TypeMirror t = ex.getTypeMirror();
            return (t != null)
                    ? t.hashCode()
                    : ex.getQualifiedName().hashCode();
        }
View Full Code Here

                    ? t.hashCode()
                    : ex.getQualifiedName().hashCode();
        }

        public boolean equals(Object obj) {
            TypeMirror t = ex.getTypeMirror();
            return t != null &&
                   obj instanceof MirroredTypeExceptionProxy &&
                   t.equals(
                        ((MirroredTypeExceptionProxy) obj).ex.getTypeMirror());
        }
View Full Code Here

    public boolean isArrayButNotByteArray(TypeMirror t) {
        if(!isArray(t))
            return false;

        ArrayType at = (ArrayType) t;
        TypeMirror ct = at.getComponentType();

        return !ct.equals(primitiveByte);
    }
View Full Code Here

    if (typeName == null) {
      typeName = "custom";
    }

    TypeMirror parameterType = null;
    if (declaration instanceof ParameterDeclaration) {
      parameterType = ((ParameterDeclaration) declaration).getType();
    }
    else if (declaration instanceof FieldDeclaration) {
      parameterType = ((FieldDeclaration) declaration).getType();
View Full Code Here

      DecoratedTypeMirror propertyType = (DecoratedTypeMirror) property.getPropertyType();
      this.adaperType = AdapterUtil.findAdapterType(property.getGetter());
      int minOccurs = propertyType.isPrimitive() ? 1 : 0;
      boolean unbounded = propertyType.isCollection() || propertyType.isArray();
      if (propertyType.isArray()) {
        TypeMirror componentType = ((ArrayType) propertyType).getComponentType();
        //special case for byte[]
        if ((componentType instanceof PrimitiveType) && (((PrimitiveType) componentType).getKind() == PrimitiveType.Kind.BYTE)) {
          unbounded = false;
        }
      }
View Full Code Here

    public String getMaxOccurs() {
      return maxOccurs;
    }

    public TypeMirror getType() {
      TypeMirror propertyType = property.getPropertyType();
      MapType mapType = MapTypeUtil.findMapType(propertyType);
      if (mapType != null) {
        propertyType = mapType;
      }
      return propertyType;
View Full Code Here

    super(conversions);
  }

  @Override
  public String convert(ImplicitChildElement childElement) throws TemplateModelException {
    TypeMirror elementType = childElement.getType();
    if ((childElement instanceof Adaptable) && (((Adaptable) childElement).isAdapted())) {
      elementType = (((Adaptable) childElement).getAdapterType().getAdaptingType(childElement.getType()));
    }

    return convert(elementType);
View Full Code Here

    return convert(elementType);
  }

  @Override
  public String convert(Accessor accessor) throws TemplateModelException {
    TypeMirror accessorType = accessor.getAccessorType();

    if (accessor.isAdapted()) {
      accessorType = accessor.getAdapterType().getAdaptingType(accessor.getAccessorType());
    }
View Full Code Here

  }


  @Override
  public TypeMirror getReturnType() {
    TypeMirror type = super.getReturnType();
    MapType mapType = MapTypeUtil.findMapType(type);
    if (mapType != null) {
      type = mapType;
    }
    return type;
View Full Code Here

TOP

Related Classes of com.sun.mirror.type.TypeMirror

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.