Tabnine Logo
Reflections.getBound
Code IndexAdd Tabnine to your IDE (free)

How to use
getBound
method
in
org.jboss.weld.util.reflection.Reflections

Best Java code snippets using org.jboss.weld.util.reflection.Reflections.getBound (Showing top 6 results out of 315)

origin: weld/core

@SuppressWarnings("unchecked")
public static <T> Class<T> getRawType(Type type) {
  if (type instanceof Class<?>) {
    return (Class<T>) type;
  }
  if (type instanceof ParameterizedType) {
    if (((ParameterizedType) type).getRawType() instanceof Class<?>) {
      return (Class<T>) ((ParameterizedType) type).getRawType();
    }
  }
  if (type instanceof TypeVariable<?>) {
    TypeVariable<?> variable = (TypeVariable<?>) type;
    Type[] bounds = variable.getBounds();
    return getBound(bounds);
  }
  if (type instanceof WildcardType) {
    WildcardType wildcard = (WildcardType) type;
    return getBound(wildcard.getUpperBounds());
  }
  if (type instanceof GenericArrayType) {
    GenericArrayType genericArrayType = (GenericArrayType) type;
    Class<?> rawType = getRawType(genericArrayType.getGenericComponentType());
    if (rawType != null) {
      return (Class<T>) Array.newInstance(rawType, 0).getClass();
    }
  }
  return null;
}
origin: weld/core

@SuppressWarnings("unchecked")
public static <T> Class<T> getRawType(Type type) {
  if (type instanceof Class<?>) {
    return (Class<T>) type;
  }
  if (type instanceof ParameterizedType) {
    if (((ParameterizedType) type).getRawType() instanceof Class<?>) {
      return (Class<T>) ((ParameterizedType) type).getRawType();
    }
  }
  if (type instanceof TypeVariable<?>) {
    TypeVariable<?> variable = (TypeVariable<?>) type;
    Type[] bounds = variable.getBounds();
    return getBound(bounds);
  }
  if (type instanceof WildcardType) {
    WildcardType wildcard = (WildcardType) type;
    return getBound(wildcard.getUpperBounds());
  }
  if (type instanceof GenericArrayType) {
    GenericArrayType genericArrayType = (GenericArrayType) type;
    Class<?> rawType = getRawType(genericArrayType.getGenericComponentType());
    if (rawType != null) {
      return (Class<T>) Array.newInstance(rawType, 0).getClass();
    }
  }
  return null;
}
origin: org.jboss.weld.se/weld-se

@SuppressWarnings("unchecked")
public static <T> Class<T> getRawType(Type type) {
  if (type instanceof Class<?>) {
    return (Class<T>) type;
  }
  if (type instanceof ParameterizedType) {
    if (((ParameterizedType) type).getRawType() instanceof Class<?>) {
      return (Class<T>) ((ParameterizedType) type).getRawType();
    }
  }
  if (type instanceof TypeVariable<?>) {
    TypeVariable<?> variable = (TypeVariable<?>) type;
    Type[] bounds = variable.getBounds();
    return getBound(bounds);
  }
  if (type instanceof WildcardType) {
    WildcardType wildcard = (WildcardType) type;
    return getBound(wildcard.getUpperBounds());
  }
  if (type instanceof GenericArrayType) {
    GenericArrayType genericArrayType = (GenericArrayType) type;
    Class<?> rawType = getRawType(genericArrayType.getGenericComponentType());
    if (rawType != null) {
      return (Class<T>) Array.newInstance(rawType, 0).getClass();
    }
  }
  return null;
}
origin: weld/core

@SuppressWarnings("unchecked")
public static <T> Class<T> getRawType(Type type) {
  if (type instanceof Class<?>) {
    return (Class<T>) type;
  }
  if (type instanceof ParameterizedType) {
    if (((ParameterizedType) type).getRawType() instanceof Class<?>) {
      return (Class<T>) ((ParameterizedType) type).getRawType();
    }
  }
  if (type instanceof TypeVariable<?>) {
    TypeVariable<?> variable = (TypeVariable<?>) type;
    Type[] bounds = variable.getBounds();
    return getBound(bounds);
  }
  if (type instanceof WildcardType) {
    WildcardType wildcard = (WildcardType) type;
    return getBound(wildcard.getUpperBounds());
  }
  if (type instanceof GenericArrayType) {
    GenericArrayType genericArrayType = (GenericArrayType) type;
    Class<?> rawType = getRawType(genericArrayType.getGenericComponentType());
    if (rawType != null) {
      return (Class<T>) Array.newInstance(rawType, 0).getClass();
    }
  }
  return null;
}
origin: org.jboss.weld.se/weld-se-shaded

@SuppressWarnings("unchecked")
public static <T> Class<T> getRawType(Type type) {
  if (type instanceof Class<?>) {
    return (Class<T>) type;
  }
  if (type instanceof ParameterizedType) {
    if (((ParameterizedType) type).getRawType() instanceof Class<?>) {
      return (Class<T>) ((ParameterizedType) type).getRawType();
    }
  }
  if (type instanceof TypeVariable<?>) {
    TypeVariable<?> variable = (TypeVariable<?>) type;
    Type[] bounds = variable.getBounds();
    return getBound(bounds);
  }
  if (type instanceof WildcardType) {
    WildcardType wildcard = (WildcardType) type;
    return getBound(wildcard.getUpperBounds());
  }
  if (type instanceof GenericArrayType) {
    GenericArrayType genericArrayType = (GenericArrayType) type;
    Class<?> rawType = getRawType(genericArrayType.getGenericComponentType());
    if (rawType != null) {
      return (Class<T>) Array.newInstance(rawType, 0).getClass();
    }
  }
  return null;
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

@SuppressWarnings("unchecked")
public static <T> Class<T> getRawType(Type type) {
  if (type instanceof Class<?>) {
    return (Class<T>) type;
  }
  if (type instanceof ParameterizedType) {
    if (((ParameterizedType) type).getRawType() instanceof Class<?>) {
      return (Class<T>) ((ParameterizedType) type).getRawType();
    }
  }
  if (type instanceof TypeVariable<?>) {
    TypeVariable<?> variable = (TypeVariable<?>) type;
    Type[] bounds = variable.getBounds();
    return getBound(bounds);
  }
  if (type instanceof WildcardType) {
    WildcardType wildcard = (WildcardType) type;
    return getBound(wildcard.getUpperBounds());
  }
  if (type instanceof GenericArrayType) {
    GenericArrayType genericArrayType = (GenericArrayType) type;
    Class<?> rawType = getRawType(genericArrayType.getGenericComponentType());
    if (rawType != null) {
      return (Class<T>) Array.newInstance(rawType, 0).getClass();
    }
  }
  return null;
}
org.jboss.weld.util.reflectionReflectionsgetBound

Popular methods of Reflections

  • cast
  • getRawType
  • loadClass
    Tries to load a class using the specified ResourceLoader. Returns null if the class is not found.
  • getInterfaceClosure
  • invokeAndUnwrap
    Invokes the method on a given instance passing in given parameters. If the invocation yields Invocat
  • isClassLoadable
  • isTopLevelOrStaticNestedClass
  • isUnboundedTypeVariable
  • isUnboundedWildcard
  • addInterfaces
  • buildTypeMap
  • containsWildcards
  • buildTypeMap,
  • containsWildcards,
  • getActualTypeArguments,
  • getNesting,
  • getNonPrivateNonStaticFinalMethod,
  • getPropertyName,
  • isAbstract,
  • isArrayType,
  • isCacheable

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • setRequestProperty (URLConnection)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top plugins for WebStorm
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