Package com.google.gwt.core.ext.typeinfo

Examples of com.google.gwt.core.ext.typeinfo.JGenericType


    return GWTClass.newInstance(method.getEnclosingType());
  }

  @Override
  public MetaType getGenericReturnType() {
    JGenericType type = method.getReturnType().isGenericType();
    if (type != null) {
      return new GWTGenericDeclaration(type);
    }
    return null;
  }
View Full Code Here


    return getAnnotation(annotation) != null;
  }

  @Override
  public MetaType getGenericType() {
    JGenericType genericType = field.getType().isGenericType();
    if (genericType != null) {
      return new GWTGenericDeclaration(genericType);
    }
    return null;
  }
View Full Code Here

  }

  @Override
  public MetaTypeVariable[] getTypeParameters() {
    List<MetaTypeVariable> typeVariables = new ArrayList<MetaTypeVariable>();
    JGenericType genericType = getEnclosedMetaObject().isGenericType();

    if (genericType != null) {
      for (JTypeParameter typeParameter : genericType.getTypeParameters()) {
        typeVariables.add(new GWTTypeVariable(typeParameter));
      }
    }

    return typeVariables.toArray(new MetaTypeVariable[typeVariables.size()]);
View Full Code Here

    return getAnnotation(annotation) != null;
  }

  @Override
  public MetaType getGenericType() {
    JGenericType genericType = field.getType().isGenericType();
    if (genericType != null) {
      return new GWTGenericDeclaration(genericType);
    }
    return null;
  }
View Full Code Here

    return GWTClass.newInstance(method.getEnclosingType());
  }

  @Override
  public MetaType getGenericReturnType() {
    JGenericType type = method.getReturnType().isGenericType();
    if (type != null) {
      return new GWTGenericDeclaration(type);
    }
    return null;
  }
View Full Code Here

    JArrayType typeArgAsArray = typeArg.isArray();
    if (typeArgAsArray != null) {
      JTypeParameter parameterOfTypeArgArray = typeArgAsArray.getLeafType().isTypeParameter();
      if (parameterOfTypeArgArray != null) {
        JGenericType declaringClass = parameterOfTypeArgArray.getDeclaringClass();
        if (declaringClass != null) {
          TypeParameterFlowInfo flowInfoForArrayParam = getFlowInfo(
              declaringClass, parameterOfTypeArgArray.getOrdinal());
          TypeParameterFlowInfo otherFlowInfo = getFlowInfo(baseType,
              paramIndex);
View Full Code Here

      if (maybeInstantiable(logger, subtypeBase)) {
        /*
         * Convert the generic type into a parameterization that only includes
         * wildcards.
         */
        JGenericType isGeneric = subtype.isGenericType();
        if (isGeneric != null) {
          subtype = isGeneric.asParameterizedByWildcards();
        } else {
          assert (subtype instanceof JRealClassType);
        }

        possiblyInstantiableTypes.add(subtype);
View Full Code Here

  }

  @Override
  public MetaTypeVariable[] getTypeParameters() {
    List<MetaTypeVariable> typeVariables = new ArrayList<MetaTypeVariable>();
    JGenericType genericType = getEnclosedMetaObject().isGenericType();

    if (genericType != null) {
      for (JTypeParameter typeParameter : genericType.getTypeParameters()) {
        typeVariables.add(new GWTTypeVariable(oracle, typeParameter));
      }
    }

    return typeVariables.toArray(new MetaTypeVariable[typeVariables.size()]);
View Full Code Here

    @Override
    protected ClassSourceFileComposerFactory createComposerFactory() {
      String parameters = "";
      if(source instanceof JGenericType)
      {
        JGenericType gtype = (JGenericType)source;
      StringBuilder builder = new StringBuilder();
      builder.append("<");
      boolean first = true;
         for(JTypeParameter arg : gtype.getTypeParameters())
         {
           if(!first)
             builder.append(",");
           builder.append(arg.getName());
           builder.append(" extends ");
View Full Code Here

    private String createClassDeclarationGenericType() {
        String parameters = "";
        if(source instanceof JGenericType)
        {
            JGenericType genericType = (JGenericType)source;
            StringBuilder builder = new StringBuilder();
            builder.append("<");
            boolean first = true;
            for(JTypeParameter arg : genericType.getTypeParameters())
            {
                if(!first)
                    builder.append(",");
                builder.append(arg.getName());
                builder.append(" extends ");
View Full Code Here

TOP

Related Classes of com.google.gwt.core.ext.typeinfo.JGenericType

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.