示例#1
0
  /**
   * {@inheritDoc} <br>
   * Returns the String representation of this JType.
   */
  public String toString() {
    if (isUseJava50()) {
      if (getComponentType().isPrimitive()) {
        JPrimitiveType primitive = (JPrimitiveType) getComponentType();
        return getName() + "<" + primitive.getWrapperName() + ">";
      }
      return getName() + "<" + getComponentType().toString() + ">";
    }

    return getName();
  }
示例#2
0
  /**
   * Returns the instance name of this collection type.
   *
   * @return The instance name of this collection type.
   */
  public String getInstanceName() {
    if (_instanceName != null) {
      if (isUseJava50()) {
        if (getComponentType().isPrimitive()) {
          JPrimitiveType primitive = (JPrimitiveType) getComponentType();
          return _instanceName + "<" + primitive.getWrapperName() + ">";
        }
        return _instanceName + "<" + getComponentType().toString() + ">";
      }

      return _instanceName;
    }

    return toString();
  }