Tabnine Logo
Modifier.isStatic
Code IndexAdd Tabnine to your IDE (free)

How to use
isStatic
method
in
java.lang.reflect.Modifier

Best Java code snippets using java.lang.reflect.Modifier.isStatic (Showing top 20 results out of 25,524)

origin: spring-projects/spring-framework

@Override
public boolean isStatic() {
  return Modifier.isStatic(this.introspectedMethod.getModifiers());
}
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: spring-projects/spring-framework

/**
 * Determine whether the given field is a "public static final" constant.
 * @param field the field to check
 */
public static boolean isPublicStaticFinal(Field field) {
  int modifiers = field.getModifiers();
  return (Modifier.isPublic(modifiers) && Modifier.isStatic(modifiers) && Modifier.isFinal(modifiers));
}
origin: spring-projects/spring-framework

@Override
protected boolean isCandidateForInvocation(Method method, Class<?> targetClass) {
  if (Modifier.isStatic(method.getModifiers())) {
    return false;
  }
  Class<?> clazz = method.getDeclaringClass();
  return (clazz != Object.class && clazz != Class.class && !ClassLoader.class.isAssignableFrom(targetClass));
}
origin: spring-projects/spring-framework

private static boolean isStaticNonPrivateAndNonFinal(Class<?> clazz) {
  Assert.notNull(clazz, "Class must not be null");
  int modifiers = clazz.getModifiers();
  return (Modifier.isStatic(modifiers) && !Modifier.isPrivate(modifiers) && !Modifier.isFinal(modifiers));
}
origin: apache/incubator-dubbo

public static boolean isPublicInstanceField(Field field) {
  return Modifier.isPublic(field.getModifiers())
      && !Modifier.isStatic(field.getModifiers())
      && !Modifier.isFinal(field.getModifiers())
      && !field.isSynthetic();
}
origin: apache/incubator-dubbo

public static boolean isPublicInstanceField(Field field) {
  return Modifier.isPublic(field.getModifiers())
      && !Modifier.isStatic(field.getModifiers())
      && !Modifier.isFinal(field.getModifiers())
      && !field.isSynthetic();
}
origin: spring-projects/spring-framework

public static boolean isCandidateWriteMethod(Method method) {
  String methodName = method.getName();
  Class<?>[] parameterTypes = method.getParameterTypes();
  int nParams = parameterTypes.length;
  return (methodName.length() > 3 && methodName.startsWith("set") && Modifier.isPublic(method.getModifiers()) &&
      (!void.class.isAssignableFrom(method.getReturnType()) || Modifier.isStatic(method.getModifiers())) &&
      (nParams == 1 || (nParams == 2 && int.class == parameterTypes[0])));
}
origin: apache/incubator-dubbo

public static boolean isBeanPropertyWriteMethod(Method method) {
  return method != null
      && Modifier.isPublic(method.getModifiers())
      && !Modifier.isStatic(method.getModifiers())
      && method.getDeclaringClass() != Object.class
      && method.getParameterTypes().length == 1
      && method.getName().startsWith("set")
      && method.getName().length() > 3;
}
origin: apache/incubator-dubbo

public static boolean isBeanPropertyWriteMethod(Method method) {
  return method != null
      && Modifier.isPublic(method.getModifiers())
      && !Modifier.isStatic(method.getModifiers())
      && method.getDeclaringClass() != Object.class
      && method.getParameterTypes().length == 1
      && method.getName().startsWith("set")
      && method.getName().length() > 3;
}
origin: apache/incubator-dubbo

public static boolean isBeanPropertyReadMethod(Method method) {
  return method != null
      && Modifier.isPublic(method.getModifiers())
      && !Modifier.isStatic(method.getModifiers())
      && method.getReturnType() != void.class
      && method.getDeclaringClass() != Object.class
      && method.getParameterTypes().length == 0
      && ((method.getName().startsWith("get") && method.getName().length() > 3)
      || (method.getName().startsWith("is") && method.getName().length() > 2));
}
origin: apache/incubator-dubbo

public static boolean isBeanPropertyReadMethod(Method method) {
  return method != null
      && Modifier.isPublic(method.getModifiers())
      && !Modifier.isStatic(method.getModifiers())
      && method.getReturnType() != void.class
      && method.getDeclaringClass() != Object.class
      && method.getParameterTypes().length == 0
      && ((method.getName().startsWith("get") && method.getName().length() > 3)
      || (method.getName().startsWith("is") && method.getName().length() > 2));
}
origin: spring-projects/spring-framework

@Override
public boolean isIndependent() {
  return (!hasEnclosingClass() ||
      (this.introspectedClass.getDeclaringClass() != null &&
          Modifier.isStatic(this.introspectedClass.getModifiers())));
}
origin: google/guava

/** Returns true if the element is static. */
public final boolean isStatic() {
 return Modifier.isStatic(getModifiers());
}
origin: spring-projects/spring-framework

@Nullable
private static Method determineToMethod(Class<?> targetClass, Class<?> sourceClass) {
  if (String.class == targetClass || String.class == sourceClass) {
    // Do not accept a toString() method or any to methods on String itself
    return null;
  }
  Method method = ClassUtils.getMethodIfAvailable(sourceClass, "to" + targetClass.getSimpleName());
  return (method != null && !Modifier.isStatic(method.getModifiers()) &&
      ClassUtils.isAssignable(targetClass, method.getReturnType()) ? method : null);
}
origin: apache/incubator-dubbo

  @Override
  public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException {
    Reference reference = getAnnotation(field, Reference.class);
    if (reference != null) {
      if (Modifier.isStatic(field.getModifiers())) {
        if (logger.isWarnEnabled()) {
          logger.warn("@Reference annotation is not supported on static fields: " + field);
        }
        return;
      }
      elements.add(new ReferenceFieldElement(field, reference));
    }
  }
});
origin: square/retrofit

private void eagerlyValidateMethods(Class<?> service) {
 Platform platform = Platform.get();
 for (Method method : service.getDeclaredMethods()) {
  if (!platform.isDefaultMethod(method) && !Modifier.isStatic(method.getModifiers())) {
   loadServiceMethod(method);
  }
 }
}
origin: google/guava

 @Override
 public boolean apply(Field input) {
  int modifiers = input.getModifiers();
  return isPublic(modifiers)
    && isStatic(modifiers)
    && isFinal(modifiers)
    && MediaType.class.equals(input.getType());
 }
});
origin: google/guava

private static Set<MethodSignature> getPublicStaticMethods(Class<?> clazz) {
 Set<MethodSignature> publicStaticMethods = newHashSet();
 for (Method method : clazz.getDeclaredMethods()) {
  int modifiers = method.getModifiers();
  if (isPublic(modifiers) && isStatic(modifiers)) {
   publicStaticMethods.add(new MethodSignature(method));
  }
 }
 return publicStaticMethods;
}
origin: google/guava

private static void doTestMocking(RateLimiter mock) throws Exception {
 for (Method method : RateLimiter.class.getMethods()) {
  if (!isStatic(method.getModifiers())
    && !NOT_WORKING_ON_MOCKS.contains(method.getName())
    && !method.getDeclaringClass().equals(Object.class)) {
   method.invoke(mock, arbitraryParameters(method));
  }
 }
}
java.lang.reflectModifierisStatic

Javadoc

Return true if the integer argument includes the static modifier, false otherwise.

Popular methods of Modifier

  • isPublic
    Return true if the integer argument includes the public modifier, false otherwise.
  • isAbstract
    Return true if the integer argument includes the abstract modifier, false otherwise.
  • isFinal
    Return true if the integer argument includes the final modifier, false otherwise.
  • isPrivate
    Return true if the integer argument includes the private modifier, false otherwise.
  • isTransient
    Return true if the integer argument includes the transient modifier, false otherwise.
  • isProtected
    Return true if the integer argument includes the protected modifier, false otherwise.
  • isInterface
    Return true if the integer argument includes the interface modifier, false otherwise.
  • isNative
    Return true if the integer argument includes the native modifier, false otherwise.
  • toString
    Return a string describing the access modifier flags in the specified modifier. For example:> publ
  • isVolatile
    Return true if the integer argument includes the volatile modifier, false otherwise.
  • isSynchronized
    Return true if the integer argument includes the synchronized modifier, false otherwise.
  • isStrict
    Return true if the integer argument includes the strictfp modifier, false otherwise.
  • isSynchronized,
  • isStrict,
  • methodModifiers,
  • constructorModifiers,
  • classModifiers,
  • fieldModifiers,
  • interfaceModifiers,
  • <init>,
  • isSynthetic

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • findViewById (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JList (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • 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