code: public static Collection<Class> getClassSimpleDependencies(Class c)
      {
          
          
          
          HashSet<Class> result = new HashSet<Class>();
  
          result.add(c); //add the own class
  
          //declared subclasses
          Class[] declaredClasses = c.getDeclaredClasses();
          for(Class cl : declaredClasses) {
              result.add(cl);
          }
  
          //fields
          Field[] declaredFields = c.getDeclaredFields();
          for(Field f : declaredFields) {
              if (!BASETYPES.contains(f.getType().getName()))
                  result.add(f.getType());
          }
  
          //method arguments/return
          Method[] declaredMethods = c.getDeclaredMethods();
          for(Method m : declaredMethods) {
              result.add(m.getReturnType());
              for(Class pc : m.getParameterTypes()) {
                  if (!BASETYPES.contains(pc.getName()))
                      result.add(pc);
              }
          }
  
          return result;
  
      }
docs: Examines a class by using the reflection API an retrieves all the
  direct dependencies with other classes (fields declarations, method
  declarations and inner classes). Don't retrieve inheritance dependencies
  nor recursively.
  
  @param c The class to examine
  @return The class direct dependencies with other classes