Tabnine Logo
WildcardType
Code IndexAdd Tabnine to your IDE (free)

How to use
WildcardType
in
org.jboss.jandex

Best Java code snippets using org.jboss.jandex.WildcardType (Showing top 11 results out of 315)

origin: wildfly/jandex

Type copyType(Type bound) {
  return new WildcardType(bound, isExtends, annotationArray());
}
origin: wildfly/jandex

public String toString() {
  StringBuilder builder = new StringBuilder();
  appendAnnotations(builder);
  builder.append('?');
  if (isExtends && bound != OBJECT) {
    builder.append(" extends ").append(bound);
  }
  if (!isExtends && bound != null) {
    builder.append(" super ").append(bound);
  }
  return builder.toString();
}
origin: spring-projects/sts4

private static String getBindingKey(WildcardType type) {
  if (type.extendsBound() != null) {
    return "+" + getGeneralTypeBindingKey(type.extendsBound());
  } else if (type.superBound() != null) {
    return "-" + getGeneralTypeBindingKey(type.superBound());
  } else {
    return "*";
  }
}
origin: wildfly/jandex

Type bound = resolveTypePath(wildcardType.bound(), typeAnnotationState);
return intern(wildcardType.copyType(bound));
origin: wildfly/jandex

case WILDCARD_TYPE:
  WildcardType wildcardType = type.asWildcardType();
  stream.writePackedU32(wildcardType.isExtends() ? 1 : 0);
  writeReference(stream, wildcardType.bound(), false);
  break;
case PARAMETERIZED_TYPE:
origin: wildfly/jandex

/**
 * Create a new mock instance of WildcardType.
 *
 * @param bound the bound (lower or upper)
 * @param isExtends true if lower, false if upper (super)
 * @return thew new mock instance
 *
 * @since 2.1
 */
public static WildcardType create(Type bound, boolean isExtends) {
  return new WildcardType(bound, isExtends);
}
origin: wildfly/jandex

private Type searchTypePath(Type type, TypeAnnotationState typeAnnotationState) {
  PathElementStack elements = typeAnnotationState.pathElements;
  PathElement element = elements.pop();
  if (element == null) {
    return type;
  }
  switch (element.kind) {
    case ARRAY: {
      ArrayType arrayType = type.asArrayType();
      int dimensions = arrayType.dimensions();
      while (--dimensions > 0 && elements.size() > 0 && elements.peek().kind == PathElement.Kind.ARRAY) {
        elements.pop();
      }
      assert dimensions == 0;
      return searchTypePath(arrayType.component(), typeAnnotationState);
    }
    case PARAMETERIZED: {
      ParameterizedType parameterizedType = type.asParameterizedType();
      return searchTypePath(parameterizedType.argumentsArray()[element.pos], typeAnnotationState);
    }
    case WILDCARD_BOUND: {
      return searchTypePath(type.asWildcardType().bound(), typeAnnotationState);
    }
    case NESTED: {
      int depth = popNestedDepth(elements);
      return searchNestedType(type, depth, typeAnnotationState);
    }
  }
  throw new IllegalStateException("Unknown path element");
}
origin: wildfly/jandex

@Override
Type copyType(AnnotationInstance[] newAnnotations) {
  return new WildcardType(bound, isExtends, newAnnotations);
}
origin: wildfly/jandex

  break;
case WILDCARD_TYPE:
  addType(type.asWildcardType().bound());
  break;
case PARAMETERIZED_TYPE:
origin: wildfly/jandex

private Type parseWildCard(boolean isExtends) {
  Type bound = parseReferenceType();
  return new WildcardType(bound, isExtends);
}
origin: wildfly/jandex

Type bound = typeTable[stream.readPackedU32()];
AnnotationInstance[] annotations = readAnnotations(stream, null);
return new WildcardType(bound, isExtends, annotations);
org.jboss.jandexWildcardType

Javadoc

Represents a generic wildcard. A generic wildcard can have either an upper (extends) or a lower (super) bound. A wildcard declared without a bound ("?") has a default extends bound of "java.lang.Object".

Most used methods

  • <init>
  • annotationArray
  • appendAnnotations
  • bound
  • copyType
  • extendsBound
    Returns the extends (upper) bound of this wildcard. If this wildcard declares a super (lower) bound,
  • isExtends
  • superBound
    Returns the super (lower) bound of this wildcard. If this wildcard declares an extends (upper) bound

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • String (java.lang)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now