Introspection
Code IndexAdd Codota to your IDE (free)

Best Java code snippets using org.apache.catalina.util.Introspection (Showing top 20 results out of 315)

origin: org.apache.tomcat/tomcat-catalina

private static String getType(Resource annotation, Class<?> defaultType) {
  Class<?> type = annotation.type();
  if (type == null || type.equals(Object.class)) {
    if (defaultType != null) {
      type = defaultType;
    }
  }
  return Introspection.convertPrimitiveType(type).getCanonicalName();
}
origin: org.apache.tomcat/tomcat-catalina

  private Class<?> getFieldType(Class<?> clazz, String name) {
    Field[] fields = Introspection.getDeclaredFields(clazz);
    if (fields != null && fields.length > 0) {
      for (Field field : fields) {
        if (field.getName().equals(name)) {
          return field.getType();
        }
      }
    }
    return null;
  }
}
origin: org.apache.tomcat/tomcat-catalina

private Class<?> getSetterType(Class<?> clazz, String name) {
  Method[] methods = Introspection.getDeclaredMethods(clazz);
  if (methods != null && methods.length > 0) {
    for (Method method : methods) {
      if (Introspection.isValidSetter(method) &&
          Introspection.getPropertyName(method).equals(name)) {
        return method.getParameterTypes()[0];
      }
    }
  }
  return null;
}
origin: codefollower/Tomcat-Research

  throws NamingException, IllegalAccessException, InvocationTargetException {
if (!Introspection.isValidSetter(method)) {
  throw new IllegalArgumentException(
      sm.getString("defaultInstanceManager.invalidInjection"));
} else {
  lookedupResource = context.lookup(
      clazz.getName() + "/" + Introspection.getPropertyName(method));
origin: codefollower/Tomcat-Research

  Field[] fields = Introspection.getDeclaredFields(clazz);
  for (Field field : fields) {
    if (injections != null && injections.containsKey(field.getName())) {
Method[] methods = Introspection.getDeclaredMethods(clazz);
Method postConstruct = null;
String postConstructFromXml = postConstructMethods.get(clazz.getName());
        Introspection.isValidSetter(method)) {
      String fieldName = Introspection.getPropertyName(method);
      if (injections.containsKey(fieldName)) {
        annotations.add(new AnnotationCacheEntry(
origin: org.apache.tomcat/tomcat-catalina

/**
 * Process the annotations for the listeners.
 *
 * @param context The context which will have its annotations processed
 */
protected static void loadApplicationListenerAnnotations(Context context) {
  String[] applicationListeners = context.findApplicationListeners();
  for (String className : applicationListeners) {
    Class<?> clazz = Introspection.loadClass(context, className);
    if (clazz == null) {
      continue;
    }
    loadClassAnnotation(context, clazz);
    loadFieldsAnnotation(context, clazz);
    loadMethodsAnnotation(context, clazz);
  }
}
origin: org.apache.tomcat/tomcat-catalina

Class<?> clazz = Introspection.loadClass(
    context, injectionTarget.getTargetClass());
if (clazz == null) {
targetType = Introspection.convertPrimitiveType(targetType);
origin: org.apache.tomcat/tomcat-catalina

private static Method findLifecycleCallback(Method currentMethod,
    String methodNameFromXml, Method method,
    Class<? extends Annotation> annotation) {
  Method result = currentMethod;
  if (methodNameFromXml != null) {
    if (method.getName().equals(methodNameFromXml)) {
      if (!Introspection.isValidLifecycleCallback(method)) {
        throw new IllegalArgumentException(
            "Invalid " + annotation.getName() + " annotation");
      }
      result = method;
    }
  } else {
    if (method.isAnnotationPresent(annotation)) {
      if (currentMethod != null || !Introspection.isValidLifecycleCallback(method)) {
        throw new IllegalArgumentException(
            "Invalid " + annotation.getName() + " annotation");
      }
      result = method;
    }
  }
  return result;
}
origin: org.apache.geronimo.ext.tomcat/catalina

  Field[] fields = Introspection.getDeclaredFields(clazz);
  for (Field field : fields) {
    if (injections != null && injections.containsKey(field.getName())) {
Method[] methods = Introspection.getDeclaredMethods(clazz);
Method postConstruct = null;
String postConstructFromXml = postConstructMethods.get(clazz.getName());
        Introspection.isValidSetter(method)) {
      String fieldName = Introspection.getPropertyName(method);
      if (injections.containsKey(fieldName)) {
        annotations.add(new AnnotationCacheEntry(
origin: org.apache.tomcat/tomcat-catalina

clazz = Introspection.loadClass(context, className);
if (clazz == null) {
          getClassName(annotationEntry.getAnnotationType()))) {
        if (clazz == null) {
          clazz = Introspection.loadClass(
              context, className);
          if (clazz == null) {
origin: org.apache.tomcat/tomcat-catalina

  throws NamingException, IllegalAccessException, InvocationTargetException {
if (!Introspection.isValidSetter(method)) {
  throw new IllegalArgumentException(
      sm.getString("defaultInstanceManager.invalidInjection"));
} else {
  lookedupResource = context.lookup(
      clazz.getName() + "/" + Introspection.getPropertyName(method));
origin: org.apache.geronimo.ext.tomcat/catalina

Class<?> clazz = Introspection.loadClass(
    context, injectionTarget.getTargetClass());
if (clazz == null) {
targetType = Introspection.convertPrimitiveType(targetType);
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

private static Method findLifecycleCallback(Method currentMethod,
    String methodNameFromXml, Method method,
    Class<? extends Annotation> annotation) {
  Method result = currentMethod;
  if (methodNameFromXml != null) {
    if (method.getName().equals(methodNameFromXml)) {
      if (!Introspection.isValidLifecycleCallback(method)) {
        throw new IllegalArgumentException(
            "Invalid " + annotation.getName() + " annotation");
      }
      result = method;
    }
  } else {
    if (method.isAnnotationPresent(annotation)) {
      if (currentMethod != null || !Introspection.isValidLifecycleCallback(method)) {
        throw new IllegalArgumentException(
            "Invalid " + annotation.getName() + " annotation");
      }
      result = method;
    }
  }
  return result;
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

private Class<?> getSetterType(Class<?> clazz, String name) {
  Method[] methods = Introspection.getDeclaredMethods(clazz);
  if (methods != null && methods.length > 0) {
    for (Method method : methods) {
      if (Introspection.isValidSetter(method) &&
          Introspection.getPropertyName(method).equals(name)) {
        return method.getParameterTypes()[0];
      }
    }
  }
  return null;
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

Method[] methods = Introspection.getDeclaredMethods(clazz);
Method postConstruct = null;
String postConstructFromXml = postConstructMethods.get(clazz.getName());
  if (context != null) {
    if (injections != null && Introspection.isValidSetter(method)) {
      String fieldName = Introspection.getPropertyName(method);
      injectionsMatchedToSetter.add(fieldName);
      if (injections.containsKey(fieldName)) {
  Field[] fields = Introspection.getDeclaredFields(clazz);
  for (Field field : fields) {
    Resource resourceAnnotation;
origin: codefollower/Tomcat-Research

clazz = Introspection.loadClass(context, className);
if (clazz == null) {
        getClassName(annotationEntry.getAnnotationType()))) {
      if (clazz == null) {
        clazz = Introspection.loadClass(
            context, className);
        if (clazz == null) {
origin: org.apache.geronimo.ext.tomcat/catalina

  throws NamingException, IllegalAccessException, InvocationTargetException {
if (!Introspection.isValidSetter(method)) {
  throw new IllegalArgumentException(
      sm.getString("defaultInstanceManager.invalidInjection"));
} else {
  lookedupResource = context.lookup(
      clazz.getName() + "/" + Introspection.getPropertyName(method));
origin: codefollower/Tomcat-Research

Class<?> clazz = Introspection.loadClass(
    context, injectionTarget.getTargetClass());
if (clazz == null) {
targetType = Introspection.convertPrimitiveType(targetType);
origin: codefollower/Tomcat-Research

  private Class<?> getFieldType(Class<?> clazz, String name) {
    Field[] fields = Introspection.getDeclaredFields(clazz);
    if (fields != null && fields.length > 0) {
      for (Field field : fields) {
        if (field.getName().equals(name)) {
          return field.getType();
        }
      }
    }
    return null;
  }
}
origin: org.apache.geronimo.ext.tomcat/catalina

private static String getType(Resource annotation, Class<?> defaultType) {
  Class<?> type = annotation.type();
  if (type == null || type.equals(Object.class)) {
    if (defaultType != null) {
      type = defaultType;
    }
  }
  return Introspection.convertPrimitiveType(type).getCanonicalName();
}
org.apache.catalina.utilIntrospection

Javadoc

Provides introspection utilities that either require knowledge of Tomcat internals or are solely used by Tomcat internals.

Most used methods

  • convertPrimitiveType
    Converts the primitive type to its corresponding wrapper.
  • getDeclaredFields
    Obtain the declared fields for a class taking account of any security manager that may be configured
  • getDeclaredMethods
    Obtain the declared methods for a class taking account of any security manager that may be configure
  • getPropertyName
    Extract the Java Bean property name from the setter name. Note: This method assumes that the method
  • isValidLifecycleCallback
    Determines if a method is a valid lifecycle callback method.
  • isValidSetter
    Determines if a method has a valid name and signature for a Java Bean setter.
  • loadClass
    Attempt to load a class using the given Container's class loader. If the class cannot be loaded, a d

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Notification (javax.management)
  • JTable (javax.swing)

For IntelliJ IDEA,
Android Studio or Eclipse

  • Search for JavaScript code betaCodota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutBlogContact Us
  • Plugin user guideTerms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)