Returns the {@link Class} object for the generated class, creating it if it does not exist

@return the generated class
165754
@SuppressWarnings("unchecked")
    public Class<? extends T> defineClass() {
        if (generatedClass == null) {
            synchronized (this) {
                if (generatedClass == null) {
                    try {
                        // first check that the proxy has not already been created
                        generatedClass = (Class<? extends T>) classLoader.loadClass(this.className);
                    } catch (ClassNotFoundException e) {
                        buildClassDefinition();
                        if (protectionDomain == null) {
                            generatedClass = (Class<? extends T>) classFile.define();
                        } else {
                            generatedClass = (Class<? extends T>) classFile.define(protectionDomain);
                        }
                        afterClassLoad(generatedClass);
                    }
                    classFile = null;
                }
            }
        }
        return generatedClass;
    }
1091106
public static ClassDescriptor getClassDescriptor(JavaClass jclass) {
        return DescriptorFactory.instance().getClassDescriptor(ClassName.toSlashedClassName(jclass.getClassName()));
    }
1067600
public ClassLoader getClassLoader() {
        return classloader != null ? classloader : (classloader = Loader.getClassLoader(ResolverUtil.class, null));
    }
1228106
public Class<?> getClassType() {
        try {
            return Class.forName(getType(), true, ClassLoaderHolder.getClassLoader());
        } catch (ClassNotFoundException e) {
            throw new IllegalStateException(e);
        }
    }
591540
@Pure
	@SuppressWarnings("unchecked")
	public Class<? extends T> getValueType() {
		if (this.object == null) {
			return null;
		}
		return (Class<? extends T>) this.object.getClass();
	}
546333
public static function getInstance()
    {
        $self = get_called_class();
        if (!isset(self::$instances[$self])) {
            self::$instances[$self] = new $self;
        }
        return self::$instances[$self];
    }
349873
public CtClass getCtClass() {
        if (ctClass == null && fileName.endsWith(".class")) {
            try {
                ctClass = ClassPool.getDefault().makeClass(getFileStream());
            } catch (IOException e) {
                logger.error("make class error", e);
            }
        }
        return ctClass;
    }
519150
@SuppressWarnings("unchecked")
	@Override
	public Class<SortedMap<K, V>> getTypeClass() {
		return (Class<SortedMap<K, V>>) (Class<?>) SortedMap.class;
	}
521750
public static SystemUtil getInstance() {

    if (instance == null) {
      synchronized (SystemUtilImpl.class) {
        if (instance == null) {
          instance = new SystemUtilImpl();
        }
      }
    }
    return instance;
  }
760452
@Override
    public final Class<J> jdbcClass() {
        @SuppressWarnings("unchecked")
        Class<J> result = (Class<J>) TypeHelper.getTypeArguments(ColumnMapper.class, getClass()).get(1);
        return result;
    }
1126968
public Class getNewClass() throws IllegalStateException, ClassFormatError {
        if (mClass != null) {
            return mClass;
        }
        ByteArrayOutputStream data = mData;
        if (data == null) {
            throw new IllegalStateException("Class not defined yet");
        }

        byte[] bytes = data.toByteArray();

        if (DEBUG) {
            File file = new File(mName.replace('.', '/') + ".class");
            try {
                File tempDir = new File(System.getProperty("java.io.tmpdir"));
                file = new File(tempDir, file.getPath());
            } catch (SecurityException e) {
            }
            try {
                file.getParentFile().mkdirs();
                System.out.println("ClassInjector writing to " + file);
                OutputStream out = new FileOutputStream(file);
                out.write(bytes);
                out.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        mClass = mLoader.define(mName, bytes);
        mData = null;
        return mClass;
    }
88034
public Class<?> getClass(Object example) {
    if (example instanceof HibernateProxy) {
      HibernateProxy proxy = (HibernateProxy) example;
      LazyInitializer initializer = proxy.getHibernateLazyInitializer();
      SessionImplementor implementor = initializer.getSession();

      if (initializer.isUninitialized()) {
        try {
          // getImplementation is going to want to talk to a session
          if (implementor.isClosed()) {
            // Give up and return example.getClass();
            return example.getClass();
          }
        } catch (NoSuchMethodError ex) {
          // We must be using Hibernate 3.0/3.1 which doesn't have
          // this method
        }
      }

      return initializer.getImplementation().getClass();
    } else {
      return example.getClass();
    }
  }
657103
protected ClassDescriptor getClassDescriptor()
    {
        ClassDescriptor cld = (ClassDescriptor) m_classDescriptor.get();
        if(cld == null)
        {
            throw new OJBRuntimeException("Requested ClassDescriptor instance was already GC by JVM");
        }
        return cld;
    }
515860
protected Class<?> getProxyClass() throws ClassNotFoundException {
        ClassLoader classLoader = getProxyClassLoader();
        return Class.forName(proxyClassName, false, classLoader);
    }
221853
public Class<?> getRawClass() {
		Type rawType = this.type;
		if (rawType instanceof ParameterizedType) {
			rawType = ((ParameterizedType) rawType).getRawType();
		}
		return (rawType instanceof Class ? (Class<?>) rawType : null);
	}
366066
public static ClassLoader getClassLoader() {
		ClassLoader classLoader = getContextClassLoader();
		if (classLoader == null) {
			classLoader = ClassLoaderUtil.class.getClassLoader();
			if (null == classLoader) {
				classLoader = ClassLoader.getSystemClassLoader();
			}
		}
		return classLoader;
	}
479627
public static Class<?> loadGenClass(Class<?> cls) throws ClassNotFoundException
    {
        Class<?> parserClass = map.get(cls);
        if (parserClass == null)
        {
            GenClassname genClassname = cls.getAnnotation(GenClassname.class);
            if (genClassname == null)
            {
                throw new IllegalArgumentException("@GenClassname not set in "+cls);
            }
            parserClass = Class.forName(genClassname.value());
            map.put(cls, parserClass);
        }
        return parserClass;
    }