Refactor some elements of mixin service into new smaller components

The main goal here is to reduce the amount of boilerplate required when
providing out simple implementations of the mixin service. Some mixin
end users are using extremely simple environments and this reduces the
boilerplate code in those implementations.
This commit is contained in:
Mumfrey committed 2019-10-16 17:17:43 +01:00
1 parent 22909dcfa2
commit 03e8ad59f0
9 files changed
+235 -168

No files matched your search

@@ -97,10 +97,20 @@ public interface IMixinService {
*/
public abstract IClassBytecodeProvider getBytecodeProvider();
// /**
// * Return the synthetic class registry for this service
// */
// public abstract ISyntheticClassRegistry getSyntheticClassRegistry();
/**
* Return the transformer provider for this service. <b>Note that unlike
* other service components, this component is allowed to be <tt>null</tt>
* for services which do not support transformers, or don't support
* interacting with them</b>!
*/
public abstract ITransformerProvider getTransformerProvider();
/**
* Return the class tracker for this service. <b>Note that unlike
* other service components, this component is allowed to be <tt>null</tt>
* for services which do not support this functionality</b>!
*/
public abstract IClassTracker getClassTracker();
/**
* Get additional platform agents for this service
@@ -130,49 +140,6 @@ public interface IMixinService {
*/
public abstract InputStream getResourceAsStream(String name);
/**
* Register an invalid class with the service classloader
*
* @param className invalid class name
*/
public abstract void registerInvalidClass(String className);
/**
* Check whether the specified class was already loaded by the service
* classloader
*
* @param className class name to check
* @return true if the class was already loaded
*/
public abstract boolean isClassLoaded(String className);
/**
* Check whether the specified class name is subject to any restrictions in
* the context of this service
*
* @param className class name to check
* @return comma-separated list of restrictions, empty string if no
* restrictions apply
*/
public abstract String getClassRestrictions(String className);
/**
* Get currently available transformers in the environment
*/
public abstract Collection<ITransformer> getTransformers();
/**
* Get currently available transformers in the environment
*/
public abstract Collection<ITransformer> getDelegatedTransformers();
/**
* Adds a transformer to the transformer exclusions list
*
* @param name Class transformer exclusion to add
*/
public abstract void addTransformerExclusion(String name);
/**
* Get the detected side name for this environment
*/