Top Description Fields Constructors Methods
groovy.lang

public Class MetaClassRegistryChangeEvent

extends EventObject
Class Inheritance
Imports
java.util.EventObject

An event used to propagate meta class updates

Field Summary

Modifier and TypeField and Description
private final Class<T>
private final Object
private final MetaClass
private final MetaClass
private static final long
Inherited from java.util.EventObject:
source

Constructor Summary

AccessConstructor and Description
public
MetaClassRegistryChangeEvent(Object
The object the event originates at.
source
,
Object
Object instance the MetaClass change is on.
instance
,
Class<T>
The class that is affected by the registry change
clazz
,
MetaClass
The old MetaClass
oldMetaClass
,
MetaClass
The new MetaClass
newMetaClass
)

Constructs a new MetaClassRegistryChangeEvent Object

Method Summary

Modifier and TypeMethod and Description
public Class<T>

Returns:

The updated class
getClassToUpdate
()

Get the class that is updated.

public Object

Returns:

the instance or null if this event is for a change for all instances of a class
getInstance
()

Returns the instance this event is for.

public MetaClass

Returns:

The new MetaClass
getNewMetaClass
()

Get the new MetaClass

public MetaClass

Returns:

The old MetaClass
getOldMetaClass
()

Get the old MetaClass

public MetaClassRegistry

Returns:

the source MetaClassRegistry
getRegistry
()

Get the MetaClassRegistry that originates this change

public boolean

Returns:

whether this event is for a single instance
isPerInstanceMetaClassChange
()

Determines if this event is for a change for a single instance or all instances of the Class.

Inherited from java.util.EventObject:
getSourcetoString

Field Detail

clazzback to summary
private final Class<T> clazz
instanceback to summary
private final Object instance
metaClassback to summary
private final MetaClass metaClass
oldMetaClassback to summary
private final MetaClass oldMetaClass
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.EventObject.serialVersionUID.

Constructor Detail

MetaClassRegistryChangeEventback to summary
public MetaClassRegistryChangeEvent(Object source, Object instance, Class<T> clazz, MetaClass oldMetaClass, MetaClass newMetaClass)

Constructs a new MetaClassRegistryChangeEvent Object

Parameters
source:Object

The object the event originates at.

instance:Object

Object instance the MetaClass change is on.

clazz:Class<T>

The class that is affected by the registry change

oldMetaClass:MetaClass

The old MetaClass

newMetaClass:MetaClass

The new MetaClass

Method Detail

getClassToUpdateback to summary
public Class<T> getClassToUpdate()

Get the class that is updated.

Returns:Class<T>

The updated class

getInstanceback to summary
public Object getInstance()

Returns the instance this event is for.

Returns:Object

the instance or null if this event is for a change for all instances of a class

getNewMetaClassback to summary
public MetaClass getNewMetaClass()

Get the new MetaClass

Returns:MetaClass

The new MetaClass

getOldMetaClassback to summary
public MetaClass getOldMetaClass()

Get the old MetaClass

Returns:MetaClass

The old MetaClass

getRegistryback to summary
public MetaClassRegistry getRegistry()

Get the MetaClassRegistry that originates this change

Returns:MetaClassRegistry

the source MetaClassRegistry

isPerInstanceMetaClassChangeback to summary
public boolean isPerInstanceMetaClassChange()

Determines if this event is for a change for a single instance or all instances of the Class.

Returns:boolean

whether this event is for a single instance