...
- make indy the only compilation target in the build
- move all non-indy bytecode interfacing code to a module, which may be removed later. This includes ScriptBytecodeAdpater as well as all the custom call site caching classes
- make a new module for MOP2
- turn meta class into an immutable
- implement meta class views
Breaking changes trace
groovy.lang.MetaObjectProtocol (currently in groovy.mop.MetaObjectProtocol):
- getProperties() renamed to getMetaProperties()
- getMethods() renamed to getMetaMethods()
- respondsTo(Object, String, Object[]) changed to respondsTo(String, Object... argTypes)
- respondsTo(Object, String) replaced by getMetaMethods(String, Class...) with the class argument being null
- hasProperty(Object,String) replaced by getMetaProperty(String) being null or not
- getStaticMetaMethod(String, Object[]) replaced by respondsTo(String, Object...) and inspecting the list for static methods
- getMetaMethod(name, Object[]) replaced by respondsTo(String, Object...) in case the arguments are no classes and getMetaMethods(String,Class...) in case of the arguments being classes
- invokeConstructor(Object[]) removed
Status colour Red title no replacement - invokeMethod(Object, String, Object[]) removed
Status colour Red title no replacement - invokeMethod(Object, String, Object) removed
Status colour Red title no replacement - invokeStaticMethod(Object, String, Object[]) removed
Status colour Red title no replacement - getProperty(Object, String) replaced by MetaProperty#invoke
- setProperty(Object, String, Object) replaced by MetaProperty#invoke
- getAttribute(Object, String) replaced by MetaProperty#getField#invoke
- setAttribute(Object, String, Object) replaced by MetaProperty#getField#invoke
- getMetaProperty(String), getTheClass()
Status colour Green title unchanged
groovy.lang.MetaMethod is split into a public interface groovy.mop.MetaMethod and an internal default implementation groovy.mop.internal.DefaultMetaMethod.
Differences to groovy.mop.internal.DefaultMetaMethod:
- does no longer extend ParameterTypes and does no longer implement Clonable
- no protected fields nativeParamTypes, parameterTypes and isVargsMethod
- the constructor MetaMethod() and MetaMethod(Class[]) are removed and partially replaced by DefaultMetaMethod(Class, String, int, MethodHandle) and DefaultMetaMethod(Class, String, MethodType), which uses the MethodType or the MethodHandle to define the parameter classes
coerceArgumentsToClasses(Object[]), correctArguments(Object[]), isValidExactMethod(Class[]), isValidExactMethod(Object[]), isValidMethod(Class[]), isValidMethod(Object[]), isVargsMethod(), isVargsMethod(Object[])
Status colour Red title no replacement - getNativeParameterTypes() replaced by getParameterClasses()
equal(CachedClass[], CachedClass[]), equal(CachedClass[], Class[]), checkParameters(Class[]), clone(), doMethodInvoke(Object, Object[]), getDescriptor()
Status colour Red title no replacement getDeclaringClass(), getModifiers(), getName(), getReturnType(), isAbstract(), isPrivate(), isProtected(), isPublic(), isStatic(), toString()
Status colour Green title unchanged - getMopName(), getSignature(), invoke(Object, Object[]), isCacheable(), isMethod(MetaMethod), isSame(MetaMethod), processDoMethodInvokeException(Exception, Object, Object[])
Status colour Red title no replacement
Useful links
The work branch for this: https://github.com/groovy/groovy-core/tree/GROOVY_3_FEATURE
