Tabnine Logo
Class.isMemberClass
Code IndexAdd Tabnine to your IDE (free)

How to use
isMemberClass
method
in
java.lang.Class

Best Java code snippets using java.lang.Class.isMemberClass (Showing top 20 results out of 2,835)

origin: libgdx/libgdx

/** Returns true if the class or interface represented by the supplied Class is a member class. */
static public boolean isMemberClass (Class c) {
  return c.isMemberClass();
}
origin: libgdx/libgdx

/** Returns true if the class or interface represented by the supplied Class is a member class. */
static public boolean isMemberClass (Class c) {
  return c.isMemberClass();
}
origin: redisson/redisson

@Override
public boolean isMemberType() {
  return type.isMemberClass();
}
origin: spring-projects/spring-framework

/**
 * Determine if the supplied class is an <em>inner class</em>,
 * i.e. a non-static member of an enclosing class.
 * @return {@code true} if the supplied class is an inner class
 * @since 5.0.5
 * @see Class#isMemberClass()
 */
public static boolean isInnerClass(Class<?> clazz) {
  return (clazz.isMemberClass() && !Modifier.isStatic(clazz.getModifiers()));
}
origin: junit-team/junit4

private Class<?> getEnclosingClassForNonStaticMemberClass(Class<?> currentTestClass) {
  if (currentTestClass.isMemberClass() && !Modifier.isStatic(currentTestClass.getModifiers())) {
    return currentTestClass.getEnclosingClass();
  } else {
    return null;
  }
}
origin: junit-team/junit4

public boolean isANonStaticInnerClass() {
  return clazz.isMemberClass() && !isStatic(clazz.getModifiers());
}
origin: google/j2objc

  public boolean isANonStaticInnerClass() {
    return fClass.isMemberClass() && !isStatic(fClass.getModifiers());
  }
}
origin: org.springframework/spring-core

/**
 * Determine if the supplied class is an <em>inner class</em>,
 * i.e. a non-static member of an enclosing class.
 * @return {@code true} if the supplied class is an inner class
 * @since 5.0.5
 * @see Class#isMemberClass()
 */
public static boolean isInnerClass(Class<?> clazz) {
  return (clazz.isMemberClass() && !Modifier.isStatic(clazz.getModifiers()));
}
origin: gocd/gocd

private boolean isANonStaticInnerClass(Class<?> candidateClass) {
  return candidateClass.isMemberClass() && !Modifier.isStatic(candidateClass.getModifiers());
}
origin: redisson/redisson

protected void check(Object task) {
  if (task == null) {
    throw new NullPointerException("Task is not defined");
  }
  if (task.getClass().isAnonymousClass()) {
    throw new IllegalArgumentException("Task can't be created using anonymous class");
  }
  if (task.getClass().isMemberClass()
      && !Modifier.isStatic(task.getClass().getModifiers())) {
    throw new IllegalArgumentException("Task class is an inner class and it should be static");
  }
}

origin: redisson/redisson

private void check(Object task) {
  if (task == null) {
    throw new NullPointerException("Task is not defined");
  }
  if (task.getClass().isAnonymousClass()) {
    throw new IllegalArgumentException("Task can't be created using anonymous class");
  }
  if (task.getClass().isMemberClass()
      && !Modifier.isStatic(task.getClass().getModifiers())) {
    throw new IllegalArgumentException("Task class is an inner class and it should be static");
  }
}
origin: org.mockito/mockito-core

private void checkNotInner(Field field) {
  Class<?> type = field.getType();
  if(type.isMemberClass() && !isStatic(type.getModifiers())) {
    throw new MockitoException("the type '" + type.getSimpleName() + "' is an inner non static class.");
  }
}
origin: redisson/redisson

protected void check(Object task) {
  if (task == null) {
    throw new NullPointerException("Task is not defined");
  }
  if (task.getClass().isAnonymousClass()) {
    throw new IllegalArgumentException("Task can't be created using anonymous class");
  }
  if (task.getClass().isMemberClass()
      && !Modifier.isStatic(task.getClass().getModifiers())) {
    throw new IllegalArgumentException("Task class is an inner class and it should be static");
  }
}

origin: redisson/redisson

private void check(Object task) {
  if (task == null) {
    throw new NullPointerException("Task is not defined");
  }
  if (task.getClass().isAnonymousClass()) {
    throw new IllegalArgumentException("Task can't be created using anonymous class");
  }
  if (task.getClass().isMemberClass()
      && !Modifier.isStatic(task.getClass().getModifiers())) {
    throw new IllegalArgumentException("Task class is an inner class and it should be static");
  }
}
origin: alibaba/fastjson

static Constructor<?> getDefaultConstructor(Class<?> clazz, final Constructor<?>[] constructors) {
  if (Modifier.isAbstract(clazz.getModifiers())) {
    return null;
  }
  Constructor<?> defaultConstructor = null;
  for (Constructor<?> constructor : constructors) {
    if (constructor.getParameterTypes().length == 0) {
      defaultConstructor = constructor;
      break;
    }
  }
  if (defaultConstructor == null) {
    if (clazz.isMemberClass() && !Modifier.isStatic(clazz.getModifiers())) {
      Class<?>[] types;
      for (Constructor<?> constructor : constructors) {
        if ((types = constructor.getParameterTypes()).length == 1
            && types[0].equals(clazz.getDeclaringClass())) {
          defaultConstructor = constructor;
          break;
        }
      }
    }
  }
  return defaultConstructor;
}
origin: google/j2objc

private void checkNotInner(Field field) {
  if(field.getType().isMemberClass() && !Modifier.isStatic(field.getType().getModifiers())) {
    throw new MockitoException("the type '" + field.getType().getSimpleName() + "' is an inner class.");
  }
}
origin: nutzam/nutz

public boolean checkClass(Class<?> klass) {
  return !(klass.isInterface()
       || klass.isArray()
       || klass.isEnum()
       || klass.isPrimitive()
       || klass.isMemberClass()
       || klass.isAnnotation()
       || klass.isAnonymousClass());
}
origin: google/guava

cls.isMemberClass() && !Modifier.isStatic(cls.getModifiers())
  ? toGenericType(cls.getEnclosingClass()).runtimeType
  : null;
origin: querydsl/querydsl

  @Override
  public boolean apply(Class<?> input) {
    return !input.isAnonymousClass()
        && !input.isMemberClass();
  }
};
origin: spring-projects/spring-framework

@SuppressWarnings("rawtypes")
private static void buildTypeVariableMap(ResolvableType type, Map<TypeVariable, Type> typeVariableMap) {
  if (type != ResolvableType.NONE) {
    Class<?> resolved = type.resolve();
    if (resolved != null && type.getType() instanceof ParameterizedType) {
      TypeVariable<?>[] variables = resolved.getTypeParameters();
      for (int i = 0; i < variables.length; i++) {
        ResolvableType generic = type.getGeneric(i);
        while (generic.getType() instanceof TypeVariable<?>) {
          generic = generic.resolveType();
        }
        if (generic != ResolvableType.NONE) {
          typeVariableMap.put(variables[i], generic.getType());
        }
      }
    }
    buildTypeVariableMap(type.getSuperType(), typeVariableMap);
    for (ResolvableType interfaceType : type.getInterfaces()) {
      buildTypeVariableMap(interfaceType, typeVariableMap);
    }
    if (resolved != null && resolved.isMemberClass()) {
      buildTypeVariableMap(ResolvableType.forClass(resolved.getEnclosingClass()), typeVariableMap);
    }
  }
}
java.langClassisMemberClass

Javadoc

Tests whether the class represented by this Class is a member class.

Popular methods of Class

  • getName
    Returns the name of the class represented by this Class. For a description of the format which is us
  • getSimpleName
  • getClassLoader
  • isAssignableFrom
    Determines if the class or interface represented by this Class object is either the same as, or is a
  • forName
    Returns the Class object associated with the class or interface with the given string name, using th
  • newInstance
    Returns a new instance of the class represented by this Class, created by invoking the default (that
  • getMethod
    Returns a Method object that reflects the specified public member method of the class or interface r
  • getResourceAsStream
  • getSuperclass
    Returns the Class representing the superclass of the entity (class, interface, primitive type or voi
  • getConstructor
  • cast
    Casts an object to the class or interface represented by this Class object.
  • isInstance
  • cast,
  • isInstance,
  • getCanonicalName,
  • getDeclaredField,
  • isArray,
  • getAnnotation,
  • getDeclaredFields,
  • getResource,
  • getDeclaredMethod,
  • getMethods

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • JFileChooser (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top Sublime Text plugins
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