Class ObfuscatorProperties
java.lang.Object
com.github.robtimus.obfuscation.spring.boot.autoconfigure.ObfuscatorProperties
Properties for
Obfuscators.- Author:
- Rob Spoor
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe supported obfuscation modes.static final classValidator forObfuscatorProperties.ValidObfuscatorPropertiesandObfuscatorProperties.static @interfaceIndicates anObfuscatorPropertiesobject must be valid. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateObfuscator(ObjectFactory objectFactory) Creates an obfuscator based on the properties configured in this object.createObfuscator(AutowireCapableBeanFactory beanFactory) Creates an obfuscator based on the properties configured in this object.static List<Obfuscator>createObfuscators(Collection<ObfuscatorProperties> properties, ObjectFactory objectFactory) Creates obfuscators based on the properties configured in multiple properties objects.static List<Obfuscator>createObfuscators(Collection<ObfuscatorProperties> properties, AutowireCapableBeanFactory beanFactory) Creates obfuscators based on the properties configured in multiple properties objects.static <K> Map<K,Obfuscator> createObfuscators(Map<? extends K, ObfuscatorProperties> properties, ObjectFactory objectFactory) Creates obfuscators based on the properties configured in multiple properties objects.static <K> Map<K,Obfuscator> createObfuscators(Map<? extends K, ObfuscatorProperties> properties, AutowireCapableBeanFactory beanFactory) Creates obfuscators based on the properties configured in multiple properties objects.getMode()Class<? extends ObfuscatorProvider>voidsetAtLeastFromEnd(Integer atLeastFromEnd) voidsetAtLeastFromStart(Integer atLeastFromStart) voidsetFixedLength(Integer fixedLength) voidsetFixedTotalLength(Integer fixedTotalLength) voidsetFixedValue(String fixedValue) voidsetKeepAtEnd(Integer keepAtEnd) voidsetKeepAtStart(Integer keepAtStart) voidsetMaskChar(Character maskChar) voidvoidsetProviderClass(Class<? extends ObfuscatorProvider> providerClass)
-
Constructor Details
-
ObfuscatorProperties
public ObfuscatorProperties()
-
-
Method Details
-
getMode
-
setMode
-
getMaskChar
-
setMaskChar
-
getFixedLength
-
setFixedLength
-
getFixedValue
-
setFixedValue
-
getKeepAtStart
-
setKeepAtStart
-
getKeepAtEnd
-
setKeepAtEnd
-
getAtLeastFromStart
-
setAtLeastFromStart
-
getAtLeastFromEnd
-
setAtLeastFromEnd
-
getFixedTotalLength
-
setFixedTotalLength
-
getProviderClass
-
setProviderClass
-
createObfuscator
Creates an obfuscator based on the properties configured in this object.- Parameters:
beanFactory- A bean factory to use to create instances ofObfuscatorProviderif needed.- Returns:
- The created obfuscator.
- Throws:
NullPointerException- If the given bean factory isnull.IllegalStateException- If this object is in an inconsistent state.
-
createObfuscator
Creates an obfuscator based on the properties configured in this object.- Parameters:
objectFactory- The object factory to use to create instances ofObfuscatorProviderif needed.- Returns:
- The created obfuscator.
- Throws:
NullPointerException- If the given object factory isnull.IllegalStateException- If this object is in an inconsistent state.
-
createObfuscators
public static List<Obfuscator> createObfuscators(Collection<ObfuscatorProperties> properties, AutowireCapableBeanFactory beanFactory) Creates obfuscators based on the properties configured in multiple properties objects.- Parameters:
properties- A collection of properties objects for which to create obfuscators.beanFactory- A bean factory to use to create instances ofObfuscatorProviderif needed.- Returns:
- The created obfuscators.
- Throws:
NullPointerException- If the given collection, any of its elements, or the given bean factory isnull.IllegalStateException- If any of the properties objects is in an inconsistent state.
-
createObfuscators
public static List<Obfuscator> createObfuscators(Collection<ObfuscatorProperties> properties, ObjectFactory objectFactory) Creates obfuscators based on the properties configured in multiple properties objects.- Parameters:
properties- A collection of properties objects for which to create obfuscators.objectFactory- The object factory to use to create instances ofObfuscatorProviderif needed.- Returns:
- The created obfuscators.
- Throws:
NullPointerException- If the given collection, any of its elements, or the given bean factory isnull.IllegalStateException- If any of the properties objects is in an inconsistent state.
-
createObfuscators
public static <K> Map<K,Obfuscator> createObfuscators(Map<? extends K, ObfuscatorProperties> properties, AutowireCapableBeanFactory beanFactory) Creates obfuscators based on the properties configured in multiple properties objects.- Type Parameters:
K- The map key type.- Parameters:
properties- A map with properties objects for which to create obfuscators.beanFactory- A bean factory to use to create instances ofObfuscatorProviderif needed.- Returns:
- The created obfuscators.
- Throws:
NullPointerException- If the given map, any of its values, or the given bean factory isnull.IllegalStateException- If any of the properties objects is in an inconsistent state.- Since:
- 2.2
-
createObfuscators
public static <K> Map<K,Obfuscator> createObfuscators(Map<? extends K, ObfuscatorProperties> properties, ObjectFactory objectFactory) Creates obfuscators based on the properties configured in multiple properties objects.- Type Parameters:
K- The map key type.- Parameters:
properties- A map with properties objects for which to create obfuscators.objectFactory- The object factory to use to create instances ofObfuscatorProviderif needed.- Returns:
- The created obfuscators.
- Throws:
NullPointerException- If the given map, any of its values, or the given bean factory isnull.IllegalStateException- If any of the properties objects is in an inconsistent state.- Since:
- 2.2
-