Java Code Examples for net.sf.cglib.proxy.Enhancer#isEnhanced()

The following examples show how to use net.sf.cglib.proxy.Enhancer#isEnhanced() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VariableInterpolator.java    From onedev with MIT License 5 votes vote down vote up
@SuppressWarnings("unchecked")
public static <T> Class<T> getUninterceptedClass(T object) {
	Class<T> clazz = (Class<T>) object.getClass();
	while (Enhancer.isEnhanced(clazz))
		clazz = (Class<T>) clazz.getSuperclass();
	return clazz;
}
 
Example 2
Source File: CGLIBMapper.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
public String serializedClass(Class type) {
    String serializedName = super.serializedClass(type);
    if (type == null) {
        return serializedName;
    }
    String typeName = type.getName();
    return typeName.equals(serializedName)
        && typeName.indexOf(DEFAULT_NAMING_MARKER) > 0
        && Enhancer.isEnhanced(type) ? alias : serializedName;
}
 
Example 3
Source File: BaseDaoReindexRegistry.java    From projectforge-webapp with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Register dao to be called after updating an object of type clazz for updating search index of dependent objects managed by the given
 * dao.
 * @param clazz Type of modified object
 * @param dao Dao to notify.
 */
public void registerDependent(Class< ? extends BaseDO< ? >> clazz, BaseDao< ? > dao)
{
  if (Enhancer.isEnhanced(dao.getClass()) == true) {
    return;
  }
  Set<BaseDao< ? >> set = this.registeredDependents.get(clazz);
  if (set == null) {
    set = new HashSet<BaseDao< ? >>();
    this.registeredDependents.put(clazz, set);
  }
  set.add(dao);
}
 
Example 4
Source File: CGLIBEnhancedConverter.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public boolean canConvert(Class type) {
    return type != null && Enhancer.isEnhanced(type) && type.getName().indexOf(DEFAULT_NAMING_MARKER) > 0
        || type == CGLIBMapper.Marker.class;
}