(Class<?> sender, final Object object, final String name, final Object newValue, final MissingPropertyException mpe)
| 3098 | } |
| 3099 | |
| 3100 | private void setOuterProperty(Class<?> sender, final Object object, final String name, final Object newValue, final MissingPropertyException mpe) { |
| 3101 | if (sender == null) sender = theClass; // GROOVY-11745 |
| 3102 | if (sender == theClass ? isGroovyObject() : GroovyObject.class.isAssignableFrom(sender)) { |
| 3103 | var outerClass = getNonClosureOuter(sender); // check outer class nesting of call site |
| 3104 | if (outerClass != null && (sender == theClass || sender.isAssignableFrom(theClass))) { |
| 3105 | MetaClass omc = registry.getMetaClass(outerClass); |
| 3106 | Object target = getOuterReference(sender, object); |
| 3107 | try { |
| 3108 | omc.setProperty(outerClass, target, name, newValue, false, false); |
| 3109 | return; |
| 3110 | } catch (MissingPropertyException e) { |
| 3111 | mpe.addSuppressed(e); |
| 3112 | } |
| 3113 | } |
| 3114 | } |
| 3115 | throw mpe; |
| 3116 | } |
| 3117 | |
| 3118 | private MetaProperty getMetaProperty(final Class<?> clazz, final String name, final boolean useSuper, final boolean useStatic) { |
| 3119 | CachedClass cachedClass = (clazz == null || clazz == theClass) ? theCachedClass : ReflectionCache.getCachedClass(clazz); |
no test coverage detected