@ Override public void setMetaClass ( final MetaClass metaClass ) { final MetaClass newMetaClass = new DelegatingMetaClass ( metaClass ) { @ Override public Object getAttribute ( final Object object , final String attribute ) { return GPathResult . this . getProperty ( "@" + attribute ) ; } @ Override public void setAttribute ( final Object object , final String attribute , final Object newValue ) { GPathResult . this . setProperty ( "@" + attribute , newValue ) ; } } ; super . setMetaClass ( newMetaClass ) ; }
Replaces the MetaClass of this GPathResult .