Example #1
1
  /**
   * Returns the generic supertype for {@code supertype}. For example, given a class {@code
   * IntegerSet}, the result for when supertype is {@code Set.class} is {@code Set<Integer>} and the
   * result when the supertype is {@code Collection.class} is {@code Collection<Integer>}.
   */
  static Type getGenericSupertype(Type context, Class<?> rawType, Class<?> toResolve) {
    if (toResolve == rawType) {
      return context;
    }

    // we skip searching through interfaces if unknown is an interface
    if (toResolve.isInterface()) {
      Class<?>[] interfaces = rawType.getInterfaces();
      for (int i = 0, length = interfaces.length; i < length; i++) {
        if (interfaces[i] == toResolve) {
          return rawType.getGenericInterfaces()[i];
        } else if (toResolve.isAssignableFrom(interfaces[i])) {
          return getGenericSupertype(rawType.getGenericInterfaces()[i], interfaces[i], toResolve);
        }
      }
    }

    // check our supertypes
    if (!rawType.isInterface()) {
      while (rawType != Object.class) {
        Class<?> rawSupertype = rawType.getSuperclass();
        if (rawSupertype == toResolve) {
          return rawType.getGenericSuperclass();
        } else if (toResolve.isAssignableFrom(rawSupertype)) {
          return getGenericSupertype(rawType.getGenericSuperclass(), rawSupertype, toResolve);
        }
        rawType = rawSupertype;
      }
    }

    // we can't resolve this further
    return toResolve;
  }
 private static Type getClosestParentType(Class paramClass1, Class paramClass2) {
   Object localObject1;
   int j;
   Object localObject2;
   Class localClass;
   if (paramClass2.isInterface()) {
     Type[] arrayOfType = paramClass1.getGenericInterfaces();
     localObject1 = null;
     int i = arrayOfType.length;
     j = 0;
     if (j < i) {
       localObject2 = arrayOfType[j];
       if ((localObject2 instanceof ParameterizedType)) {
         localClass = getRawType((ParameterizedType) localObject2);
         label52:
         if ((!isAssignable(localClass, paramClass2))
             || (!isAssignable((Type) localObject1, localClass))) break label133;
       }
     }
   }
   while (true) {
     j++;
     localObject1 = localObject2;
     break;
     if ((localObject2 instanceof Class)) {
       localClass = (Class) localObject2;
       break label52;
     }
     throw new IllegalStateException("Unexpected generic interface type found: " + localObject2);
     if (localObject1 != null) return localObject1;
     return paramClass1.getGenericSuperclass();
     label133:
     localObject2 = localObject1;
   }
 }
  private void configureMapperTypesIfPossible(Job j, Class<? extends Mapper> mapper) {
    // Find mapper
    Class<?> targetClass = mapper;
    Type targetType = mapper;

    do {
      targetType = targetClass.getGenericSuperclass();
      targetClass = targetClass.getSuperclass();
    } while (targetClass != null
        && targetClass != Object.class
        && !Mapper.class.equals(targetClass));

    if (targetType instanceof ParameterizedType) {
      Type[] params = ((ParameterizedType) targetType).getActualTypeArguments();
      if (params.length == 4) {
        // set each param (if possible);
        if (params[2] instanceof Class) {
          Class<?> clz = (Class<?>) params[2];
          if (!clz.isInterface()) j.setMapOutputKeyClass(clz);
        }

        // set each param (if possible);
        if (params[3] instanceof Class) {
          Class<?> clz = (Class<?>) params[3];
          if (!clz.isInterface()) {
            j.setMapOutputValueClass(clz);
          }
        }
      }
    }
  }
Example #4
1
  /**
   * Determines the key type for a Map.
   *
   * @param type The parametrized type.
   * @param path The path to the type, used in exception message.
   * @return The key type.
   */
  public static Type[] mapTypes(Type type, String path) {
    if (type instanceof Class) {
      Class c = (Class) type;
      type = c.getGenericSuperclass();
      if (!(isGenericMap(type))) {
        Type[] types = c.getGenericInterfaces();
        if (types != null && types.length > 0) {
          for (Type t : types) {
            if (isGenericMap(t)) {
              type = t;
              break;
            }
          }
        }
      }
    }

    if (type instanceof ParameterizedType) {
      ParameterizedType parameterizedType = (ParameterizedType) type;
      Class<?> rawType = (Class<?>) parameterizedType.getRawType();
      if (Map.class.isAssignableFrom(rawType)) {
        return parameterizedType.getActualTypeArguments();
      }
    }

    throw new CollectionExpressionException(
        "The method or member ["
            + path
            + "] returns a simple Map. Unable to determine the "
            + "types of the Map. Please make this method or member generic so that the correct type can be determined.");
  }
  private Object searchForBaseClass(
      Class<?> clazz, AutoBindSingleton annotation, Set<Object> usedSet) {
    if (clazz == null) {
      return null;
    }

    if (clazz.equals(annotation.value())) {
      return clazz;
    }

    if (!usedSet.add(clazz)) {
      return null;
    }

    for (Type type : clazz.getGenericInterfaces()) {
      if (MoreTypes.getRawType(type).equals(annotation.value())) {
        return type;
      }
    }

    if (clazz.getGenericSuperclass() != null) {
      if (MoreTypes.getRawType(clazz.getGenericSuperclass()).equals(annotation.value())) {
        return clazz.getGenericSuperclass();
      }
    }

    for (Class<?> interfaceClass : clazz.getInterfaces()) {
      Object foundBindingClass = searchForBaseClass(interfaceClass, annotation, usedSet);
      if (foundBindingClass != null) {
        return foundBindingClass;
      }
    }

    return searchForBaseClass(clazz.getSuperclass(), annotation, usedSet);
  }
Example #6
0
 public static <T> Class<T> getGenericType(Class<?> klass, int index) {
   Type genericSuperclass = klass.getGenericSuperclass();
   if (genericSuperclass instanceof ParameterizedType)
     return (Class<T>)
         ((ParameterizedType) klass.getGenericSuperclass()).getActualTypeArguments()[index];
   if (genericSuperclass.equals(Object.class)) return null;
   return getGenericType(klass.getSuperclass(), index);
 }
 private List<String> GetExtends(Class<?> cls) {
   List<String> list = new ArrayList<>();
   if (cls.getGenericSuperclass() != null) {
     String name = cls.getGenericSuperclass().getTypeName();
     list.add(name);
   }
   return list;
 }
Example #8
0
  /**
   * Method to resolve a TypeVariable to its most <a
   * href="http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#112582">reifiable</a>
   * form.
   *
   * <p>How to resolve a TypeVariable:<br>
   * All of the TypeVariables defined by a generic class will be given a Type by any class that
   * extends it. The Type given may or may not be reifiable; it may be another TypeVariable for
   * instance.
   *
   * <p>Consider <br>
   * <i>class Pair&gt;A,B> { A getA(){...}; ...}</i><br>
   * <i>class StringLongPair extends Pair&gt;String, Long> { }</i><br>
   * To resolve the actual return type of Pair.getA() you must first resolve the TypeVariable "A".
   * We can do that by first finding the index of "A" in the Pair.class.getTypeParameters() array of
   * TypeVariables.
   *
   * <p>To get to the Type provided by StringLongPair you access the generics information by calling
   * StringLongPair.class.getGenericSuperclass; this will be a ParameterizedType. ParameterizedType
   * gives you access to the actual type arguments provided to Pair by StringLongPair. The array is
   * in the same order as the array in Pair.class.getTypeParameters so you can use the index we
   * discovered earlier to extract the Type; String.class.
   *
   * <p>When extracting Types we only have to consider the superclass hierarchy and not the
   * interfaces implemented by the class. When a class implements a generic interface it must
   * provide types for the interface and any generic methods implemented from the interface will be
   * re-defined by the class with its generic type variables.
   *
   * @param typeVariable - the type variable to resolve.
   * @param containingType - the shallowest class in the class hierarchy (furthest from Object)
   *     where typeVariable is defined.
   * @return a Type that has had all possible TypeVariables resolved that have been defined between
   *     the type variable declaration and the containingType.
   */
  private static Type resolve(TypeVariable typeVariable, Type containingType) {
    // The generic declaration is either a Class, Method or Constructor
    final GenericDeclaration genericDeclaration = typeVariable.getGenericDeclaration();

    if (!(genericDeclaration instanceof Class)) {
      // It's a method or constructor. The best we can do here is try to resolve the bounds
      // e.g. <T extends E> T getT(T param){} where E is defined by the class.
      final Type bounds0 = typeVariable.getBounds()[0];
      return resolve(bounds0, containingType);
    }

    final Class typeVariableOwner = (Class) genericDeclaration;

    // find the typeOwner in the containingType's hierarchy
    final LinkedList<Type> stack = new LinkedList<Type>();

    // If you pass a List<Long> as the containingType then the TypeVariable is going to be resolved
    // by the
    // containingType and not the super class.
    if (containingType instanceof ParameterizedType) {
      stack.add(containingType);
    }

    Class theClass = asClass(containingType);
    Type genericSuperclass = theClass.getGenericSuperclass();
    while (genericSuperclass != null
        && // true for interfaces with no superclass
        !theClass.equals(Object.class)
        && !theClass.equals(typeVariableOwner)) {
      stack.addFirst(genericSuperclass);
      theClass = asClass(genericSuperclass);
      genericSuperclass = theClass.getGenericSuperclass();
    }

    int i = getTypeVariableIndex(typeVariable);
    Type resolved = typeVariable;
    for (Type t : stack) {
      if (t instanceof ParameterizedType) {
        resolved = ((ParameterizedType) t).getActualTypeArguments()[i];
        if (resolved instanceof Class) return resolved;
        if (resolved instanceof TypeVariable) {
          // Need to look at the next class in the hierarchy
          i = getTypeVariableIndex((TypeVariable) resolved);
          continue;
        }
        return resolve(resolved, containingType);
      }
    }

    // the only way we get here is if resolved is still a TypeVariable, otherwise an
    // exception is thrown or a value is returned.
    return ((TypeVariable) resolved).getBounds()[0];
  }
 static Class<?> getTypeFromXmlAdapter(XmlJavaTypeAdapter xjta) {
   if (xjta != null) {
     Class<?> c2 = xjta.value();
     Type sp = c2.getGenericSuperclass();
     while (!XmlAdapter.class.equals(c2) && c2 != null) {
       sp = c2.getGenericSuperclass();
       c2 = c2.getSuperclass();
     }
     if (sp instanceof ParameterizedType) {
       return (Class<?>) ((ParameterizedType) sp).getActualTypeArguments()[0];
     }
   }
   return null;
 }
Example #10
0
  /** Default constructor. Loads entity class from super service information. It is used */
  @SuppressWarnings({"unchecked", "rawtypes"})
  public BaseService() {
    Class clazz = getClass();
    while (!(clazz.getGenericSuperclass() instanceof ParameterizedType)) {
      clazz = clazz.getSuperclass();
    }
    Object o = ((ParameterizedType) clazz.getGenericSuperclass()).getActualTypeArguments()[0];

    if (o instanceof TypeVariable) {
      this.entityClass = (Class<T>) ((TypeVariable) o).getBounds()[0];
    } else {
      this.entityClass = (Class<T>) o;
    }
  }
Example #11
0
  private static GenericType getFieldType(
      VariableMapping currentMapping, Class<?> startClass, String fieldname) {
    Type type = null;
    Field field = null; // e.g. BClass<String, Integer> bObject;
    {
      Class<?> ownerClass = startClass;
      findfield:
      while (true) {
        Field[] fields = ownerClass.getDeclaredFields();
        for (Field f : fields) {
          if (f.getName().equals(fieldname)) {
            field = f;
            break findfield;
          }
        }
        // field not found so far
        // -> search superclass
        Type superType = ownerClass.getGenericSuperclass();
        if (superType instanceof ParameterizedType) {
          ParameterizedType parameterizedSuperType = (ParameterizedType) superType;
          currentMapping = new VariableMapping(currentMapping, parameterizedSuperType);
          ownerClass = (Class<?>) parameterizedSuperType.getRawType();
        } else if (superType instanceof Class<?>) {
          ownerClass = (Class<?>) superType;
        } else {
          throw new IllegalStateException();
        }
      }
    }

    type = field.getGenericType(); // e.g. BClass<String, Integer>

    return getGenericType(currentMapping, type);
  }
Example #12
0
  /**
   * 通过反射, 获得Class定义中声明的父类的泛型参数的类型. 如无法找到, 返回Object.class.
   *
   * <p>如public UserDao extends HibernateDao<User,Long>
   *
   * @param clazz clazz The class to introspect
   * @param index the Index of the generic ddeclaration,start from 0.
   * @return the index generic declaration, or Object.class if cannot be determined
   */
  @SuppressWarnings("rawtypes")
  public static Class getSuperClassGenricType(final Class clazz, final int index) {

    Type genType = clazz.getGenericSuperclass();

    if (!(genType.getClass().isAssignableFrom(ParameterizedType.class))) {
      log.warn(clazz.getSimpleName() + "'s superclass not ParameterizedType");
      return Object.class;
    }

    Type[] params = ((ParameterizedType) genType).getActualTypeArguments();

    if (index >= params.length || index < 0) {
      log.warn(
          "Index: "
              + index
              + ", Size of "
              + clazz.getSimpleName()
              + "'s Parameterized Type: "
              + params.length);
      return Object.class;
    }
    if (!(params[index].getClass().isAssignableFrom(Class.class))) {
      log.warn(clazz.getSimpleName() + " not set the actual class on superclass generic parameter");
      return Object.class;
    }

    return (Class) params[index];
  }
  /**
   * 取得父类泛型的参数
   *
   * <pre>public UserDao extends HibernateDao<User,Long></pre>
   *
   * @param targetClass 要反射的目标对象
   * @param index 要反射的参数位置,从0开始计算
   * @return
   */
  public static Class<?> getSuperClassGenricType(final Class<?> targetClass, final int index) {
    Assert.notNull(targetClass, "targetClass不能为空");
    Type type = targetClass.getGenericSuperclass();
    if (!(type instanceof ParameterizedType)) {
      logger.warn("{}'s super class not parameterized type.", targetClass.getSimpleName());
      return Object.class;
    }

    // 泛型的列表
    Type[] argTypes = ((ParameterizedType) type).getActualTypeArguments();
    if (index < 0 || index > argTypes.length) {
      logger.warn(
          "index {} not range in {} parameter type length 0 - {}",
          index,
          targetClass.getSimpleName(),
          argTypes.length);
      return Object.class;
    }
    if (!(argTypes[index] instanceof Class<?>)) {
      logger.warn("{} not type of class", argTypes[index]);
      return Object.class;
    }

    // return argTypes[index].getClass();
    return (Class<?>) argTypes[index];
  }
 /** Gets type from super class's type parameter. */
 static Type getSuperclassTypeParameter(Class<?> subclass) {
   Type superclass = subclass.getGenericSuperclass();
   if (superclass instanceof Class) {
     throw new RuntimeException("Missing type parameter.");
   }
   return ((ParameterizedType) superclass).getActualTypeArguments()[0];
 }
 @Override
 protected void found(final Class<ActEventListener> target, final App app) {
     final EventBus bus = app.eventBus();
     ParameterizedType ptype = null;
     Type superType = target.getGenericSuperclass();
     while (ptype == null) {
         if (superType instanceof ParameterizedType) {
             ptype = (ParameterizedType) superType;
         } else {
             if (Object.class == superType) {
                 logger.warn("Event listener registration failed: cannot find generic information for %s", target.getName());
                 return;
             }
             superType = ((Class) superType).getGenericSuperclass();
         }
     }
     Type[] ca = ptype.getActualTypeArguments();
     for (Type t : ca) {
         if (t instanceof Class) {
             final Class tc = (Class) t;
             if (ActEvent.class.isAssignableFrom(tc)) {
                 app.eventBus().bind(AppEventId.DEPENDENCY_INJECTOR_LOADED, new AppEventListenerBase() {
                     @Override
                     public void on(EventObject event) throws Exception {
                         ActEventListener listener = (ActEventListener) app.newInstance(target);
                         bus.bind(tc, listener);
                     }
                 });
                 return;
             }
         }
     }
 }
Example #16
0
  /**
   * 通过反射, 获得Class定义中声明的父类的泛型参数的类型. 如无法找到, 返回Object.class.
   *
   * <p>如public UserDao extends HibernateDao<User,Long>
   *
   * @param clazz clazz The class to introspect
   * @param index the Index of the generic ddeclaration,start from 0.
   * @return the index generic declaration, or Object.class if cannot be determined
   */
  public static Class getClassGenricType(final Class clazz, final int index) {

    Type genType = clazz.getGenericSuperclass();

    if (!(genType instanceof ParameterizedType)) {
      logger.warn(clazz.getSimpleName() + "'s superclass not ParameterizedType");
      return Object.class;
    }

    Type[] params = ((ParameterizedType) genType).getActualTypeArguments();

    if ((index >= params.length) || (index < 0)) {
      logger.warn(
          "Index: "
              + index
              + ", Size of "
              + clazz.getSimpleName()
              + "'s Parameterized Type: "
              + params.length);
      return Object.class;
    }
    if (!(params[index] instanceof Class)) {
      logger.warn(
          clazz.getSimpleName() + " not set the actual class on superclass generic parameter");
      return Object.class;
    }

    return (Class) params[index];
  }
 protected static HierarchicType _findSuperInterfaceChain(Type currentType, Class<?> target) {
   HierarchicType current = new HierarchicType(currentType);
   Class<?> raw = current.getRawClass();
   if (raw == target) {
     return current;
   }
   // Otherwise, keep on going down the rat hole; first implemented interaces
   Type[] parents = raw.getGenericInterfaces();
   // as long as there are superclasses
   // and unless we have already seen the type (<T extends X<T>>)
   if (parents != null) {
     for (Type parent : parents) {
       HierarchicType sup = _findSuperInterfaceChain(parent, target);
       if (sup != null) {
         sup.setSubType(current);
         current.setSuperType(sup);
         return current;
       }
     }
   }
   // and then super-class if any
   Type parent = raw.getGenericSuperclass();
   if (parent != null) {
     HierarchicType sup = _findSuperInterfaceChain(parent, target);
     if (sup != null) {
       sup.setSubType(current);
       current.setSuperType(sup);
       return current;
     }
   }
   return null;
 }
 private void readActualTypeParametersOnDeclaringClass() {
   registerTypeParametersOn(clazz.getTypeParameters());
   registerTypeVariablesOn(clazz.getGenericSuperclass());
   for (Type genericInterface : clazz.getGenericInterfaces()) {
     registerTypeVariablesOn(genericInterface);
   }
 }
Example #19
0
 /**
  * 获取c的泛型类型
  *
  * @param c
  * @param superclass: 指定是从父类还是父接口中取, true=父类, false=接口
  * @param index: 如果是从接口中找泛型, 则指定第几个接口
  * @return
  */
 public static Type getGenericType(Class<?> c, boolean superclass, int index) {
   Type type = superclass ? c.getGenericSuperclass() : c.getGenericInterfaces()[index];
   if (type instanceof ParameterizedType) {
     return getGenericType((ParameterizedType) type);
   } else {
     return Object.class;
   }
 }
Example #20
0
 /** @param entityClass */
 @SuppressWarnings("unchecked")
 protected BaseDao() {
   // entity ManagerFactory = Persistence.createEntityManagerFactory("wats");
   @SuppressWarnings("rawtypes")
   Class getClass = (Class) getClass();
   ParameterizedType genericSuperclass = (ParameterizedType) getClass.getGenericSuperclass();
   this.entityClass = (Class<T_ENTITY>) genericSuperclass.getActualTypeArguments()[0];
 }
Example #21
0
  @SuppressWarnings("unchecked")
  public static <E> Class<E> inferEntityClass(Object instance, Class<?> limitClass) {

    Class<? extends Object> instClass = instance.getClass();
    Type superType = instClass.getGenericSuperclass();
    // procura o primeiro tipo parametrizado na hierarquia
    while (!(superType instanceof ParameterizedType)) {
      final Class<?> superclass = (Class<?>) superType;
      if (superclass.isAssignableFrom(limitClass)) {
        // se chegou até o CrudDao e não é um tipo parametrizado
        // Isto pode acontecer se alguém estender diretamente a CrudDAO e não passar o parâmetro de
        // tipo
        final String daoName = instClass.getName();
        throw new RuntimeException(
            "A classe "
                + daoName
                + " ou uma das suas super classes devem declarar explicitamente o parâmetro de tipo E!");
      }
      superType = superclass.getGenericSuperclass();
    }

    final ParameterizedType parameterizedType = (ParameterizedType) superType;
    final Type typeArgument = parameterizedType.getActualTypeArguments()[0];
    if (typeArgument instanceof TypeVariable<?>) {
      // o supertipo é parametrizado, mas o parâmetro é uma variavel de tipo
      // Isto pode acontecer se o DAO extende CrudDao, por exemplo, e não informa o parâmetro de
      // tipo
      final String daoName = instClass.getName();
      throw new RuntimeException(
          "O DAO com nome "
              + daoName
              + " ou uma das suas super classes devem declarar explicitamente o parâmetro de tipo E!");
    }

    final Class<E> entityClazz = (Class<E>) typeArgument;
    if (!BasicEntity.class.isAssignableFrom(entityClazz)) {
      // cai aqui se o programador informou uma classe que não persistable como parâmetro de tipo
      final String daoName = instClass.getName();
      throw new RuntimeException(
          "O DAO com nome "
              + daoName
              + " ou uma das suas super classes devem declarar explicitamente o primeiro parâmetro de tipo com "
              + "uma subclasse de Persistable");
    }
    return entityClazz;
  }
Example #22
0
 private Class getPersistentClass() {
   Class loaderClass = getClass();
   ParameterizedType type = (ParameterizedType) loaderClass.getGenericSuperclass();
   Class genericClass = (Class) type.getActualTypeArguments()[0];
   //        return (Class<T>) ( (ParameterizedType) getClass().getGenericSuperclass()
   // ).getActualTypeArguments()[0];
   return genericClass;
 }
Example #23
0
 private static Type getGenericType(Class<?> klass) {
   Type superclass = klass.getGenericSuperclass();
   if (superclass instanceof Class) {
     throw new RuntimeException("No type parameter provided");
   }
   ParameterizedType parameterized = (ParameterizedType) superclass;
   return parameterized.getActualTypeArguments()[0];
 }
Example #24
0
 static Type a(Class class1) {
   class1 = class1.getGenericSuperclass();
   if (class1 instanceof Class) {
     throw new RuntimeException("Missing type parameter.");
   } else {
     return iz.d(((ParameterizedType) class1).getActualTypeArguments()[0]);
   }
 }
Example #25
0
 /**
  * 获取接口的泛型类型,如果不存在则返回null
  *
  * @param clazz
  * @return
  */
 public static Class<?> getGenericClass(Class<?> clazz) {
   Type t = clazz.getGenericSuperclass();
   if (t instanceof ParameterizedType) {
     Type[] p = ((ParameterizedType) t).getActualTypeArguments();
     return ((Class<?>) p[0]);
   }
   return null;
 }
Example #26
0
 private Type getSuperclassTypeParameter(Class<?> subclass) {
   Type superclass = subclass.getGenericSuperclass();
   if ((superclass instanceof Class)) {
     throw new RuntimeException("Missing type parameter.");
   }
   ParameterizedType parameterized = (ParameterizedType) superclass;
   return $Gson$Types.canonicalize(parameterized.getActualTypeArguments()[0]);
 }
Example #27
0
  public static Class getGenericSupertype(Class type) {
    Class[] componentTypes = getComponentTypes(type.getGenericSuperclass());

    if (componentTypes == null) {
      return null;
    }

    return componentTypes[0];
  }
Example #28
0
 /**
  * 获取c的泛型类型, 如果c有接口则从第一个接口中取,否则从父类中取
  *
  * @param c
  * @return
  */
 public static Type getGenericType(Class<?> c) {
   Type[] ts = c.getGenericInterfaces();
   Type type = ts.length > 0 ? ts[0] : c.getGenericSuperclass();
   if (type instanceof ParameterizedType) {
     return getGenericType((ParameterizedType) type);
   } else {
     return Object.class;
   }
 }
Example #29
0
 @SuppressWarnings("unchecked")
 public BaseDaoImpl() {
   Class<?> c = getClass();
   Type type = c.getGenericSuperclass();
   if (type instanceof ParameterizedType) {
     Type[] parameterizedType = ((ParameterizedType) type).getActualTypeArguments();
     this.entityClass = (Class<T>) parameterizedType[0];
   }
 }
  private static Class<?> getEnumForQFlags(Class<?> flagsType) {
    Type t = flagsType.getGenericSuperclass();
    if (t instanceof ParameterizedType) {
      Type typeArguments[] = ((ParameterizedType) t).getActualTypeArguments();
      return ((Class<?>) typeArguments[0]);
    }

    return null;
  }