public class RemoveCacheClassTransformer extends AbstractClassTransformer implements BroadleafClassTransformer, org.springframework.beans.factory.BeanFactoryAware
{@code| Modifier and Type | Field and Description |
|---|---|
protected String |
annotationClass |
protected org.springframework.beans.factory.config.ConfigurableBeanFactory |
beanFactory |
protected List<String> |
cacheRegions |
protected List<String> |
classNames |
protected String |
moduleName |
protected Boolean |
removeOrderCustomerEntityL2Cache |
alreadyLoadedClasses, preLoadClassNamePatterns| Constructor and Description |
|---|
RemoveCacheClassTransformer(String moduleName) |
| Modifier and Type | Method and Description |
|---|---|
protected Boolean |
annotationQualifies(javassist.bytecode.ConstPool constantPool,
List<?> attributes) |
protected Boolean |
cacheRegionQualifies(javassist.bytecode.annotation.Annotation annotation) |
protected Boolean |
classQualifies(String className) |
void |
compileJPAProperties(Properties props,
Object key) |
String |
getAnnotationClass()
The fully-qualified classname of the annotation to remove at the class and field level
|
List<String> |
getCacheRegions()
The list of cache region names to be removed by this transformer
|
List<String> |
getClassNames()
The list of fully-qualified classes to be impacted by this transformer
|
protected Boolean |
isPropertyEnabled(String propertyName) |
void |
setAnnotationClass(String annotationClass) |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setCacheRegions(List<String> cacheRegions) |
void |
setClassNames(List<String> classNames) |
protected javassist.bytecode.AnnotationsAttribute |
stripAnnotation(javassist.bytecode.ConstPool constantPool,
List<?> attributes) |
byte[] |
transform(ClassLoader loader,
String className,
Class<?> classBeingRedefined,
ProtectionDomain protectionDomain,
byte[] classfileBuffer) |
afterPropertiesSet, setPreLoadClassNamePatternsprotected String moduleName
protected String annotationClass
protected org.springframework.beans.factory.config.ConfigurableBeanFactory beanFactory
@Value(value="${remove.order.customer.entity.l2cache:false}")
protected Boolean removeOrderCustomerEntityL2Cache
public RemoveCacheClassTransformer(String moduleName)
public void compileJPAProperties(Properties props, Object key) throws Exception
compileJPAProperties in interface BroadleafClassTransformerExceptionpublic void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
throws org.springframework.beans.BeansException
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwareorg.springframework.beans.BeansExceptionpublic byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException
transform in interface javax.persistence.spi.ClassTransformerIllegalClassFormatExceptionprotected Boolean annotationQualifies(javassist.bytecode.ConstPool constantPool, List<?> attributes)
protected Boolean cacheRegionQualifies(javassist.bytecode.annotation.Annotation annotation)
protected javassist.bytecode.AnnotationsAttribute stripAnnotation(javassist.bytecode.ConstPool constantPool,
List<?> attributes)
public List<String> getClassNames()
public List<String> getCacheRegions()
public String getAnnotationClass()
public void setAnnotationClass(String annotationClass)
Copyright © 2022. All rights reserved.