Package org.codehaus.groovy.ast.tools
Class PropertyNodeUtils
java.lang.Object
org.codehaus.groovy.ast.tools.PropertyNodeUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
adjustPropertyModifiersForMethod
(PropertyNode propNode) Fields within the AST that have no explicit visibility are deemed to be properties and represented by a PropertyNode.
-
Constructor Details
-
PropertyNodeUtils
public PropertyNodeUtils()
-
-
Method Details
-
adjustPropertyModifiersForMethod
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 astransient
will have atransient
backing field) but when creating the accessor methods we don't carry over modifier values which don't make sense for methods (such asvolatile
andtransient
) but other modifiers are carried over, for examplestatic
.- Parameters:
propNode
- the original property node- Returns:
- the modifiers which make sense for an accessor method
-