Constructor @param theClass The class this is the metaclass for @param add The methods for this class
(final Class theClass, final MetaMethod[] add)
| 231 | * @param add The methods for this class |
| 232 | */ |
| 233 | public MetaClassImpl(final Class theClass, final MetaMethod[] add) { |
| 234 | this.theClass = theClass; |
| 235 | theCachedClass = ReflectionCache.getCachedClass(theClass); |
| 236 | this.isGroovyObject = GroovyObject.class.isAssignableFrom(theClass); |
| 237 | this.isMap = Map.class.isAssignableFrom(theClass); |
| 238 | this.registry = GroovySystem.getMetaClassRegistry(); |
| 239 | metaMethodIndex = new MetaMethodIndex(theCachedClass); |
| 240 | final MetaMethod[] metaMethods = theCachedClass.getNewMetaMethods(); |
| 241 | if (add != null && add.length != 0) { |
| 242 | myNewMetaMethods = concat(metaMethods, add); |
| 243 | additionalMetaMethods = metaMethods; |
| 244 | } else { |
| 245 | myNewMetaMethods = metaMethods; |
| 246 | additionalMetaMethods = MetaMethod.EMPTY_ARRAY; |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | /** |
| 251 | * Constructor that sets the methods to null |
nothing calls this directly
no test coverage detected