Top Constructors Methods
org.codehaus.groovy.ast.tools

public Class PropertyNodeUtils

extends Object
Class Inheritance
Imports
org.codehaus.groovy.ast.PropertyNode, java.lang.reflect.Modifier

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static int

Returns:

the modifiers which make sense for an accessor method
adjustPropertyModifiersForMethod
(PropertyNode
the original property node
propNode
)

Fields within the AST that have no explicit visibility are deemed to be properties and represented by a PropertyNode.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PropertyNodeUtilsback to summary
public PropertyNodeUtils()

Method Detail

adjustPropertyModifiersForMethodback to summary
public static int adjustPropertyModifiersForMethod(PropertyNode propNode)

Fields within the AST that have no explicit visibility are deemed to be properties and represented by a PropertyNode. The Groovy compiler creates accessor methods and a backing field for such property nodes. During this process, all modifiers from the property are carried over to the backing field (so a property marked as transient will have a transient backing field) but when creating the accessor methods we don't carry over modifier values which don't make sense for methods (this includes VOLATILE and TRANSIENT) but other modifiers are carried over, for example static.

Parameters
propNode:PropertyNode

the original property node

Returns:int

the modifiers which make sense for an accessor method