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

public Class BeanUtils

extends Object
Class Inheritance
Imports
groovy.transform.Internal, org.codehaus.groovy.ast.ClassHelper, .ClassNode, .MethodNode, .PropertyNode, org.codehaus.groovy.ast.stmt.Statement, java.util.ArrayList, .HashSet, .List, .Set

Field Summary

Modifier and TypeField and Description
pack-priv static final String
private static final ClassNode
pack-priv static final String
pack-priv static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static void
addExplicitProperties(ClassNode cNode, List<PropertyNode> result, Set<String> names, boolean includeStatic)

private static void
addIfMissing(ClassNode cNode, List<PropertyNode> result, Set<String> names, MethodNode mNode, ClassNode returnType, String propName, Statement getter, Statement setter)

public static void
addPseudoProperties(ClassNode origType, ClassNode cNode, List<PropertyNode> result, Set<String> names, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters)

public static void
addPseudoProperties(ClassNode origType, ClassNode cNode, List<PropertyNode> result, Set<String> names, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters, boolean traverseSuperClasses)

public static List<PropertyNode>

Returns:

the list of found property nodes
getAllProperties
(ClassNode
the ClassNode
type
,
boolean
whether to include super properties
includeSuperProperties
,
boolean
whether to include static properties
includeStatic
,
boolean
whether to include JavaBean pseudo (getXXX/isYYY) properties with no corresponding field
includePseudoGetters
)

Get all properties including JavaBean pseudo properties matching getter conventions.

public static List<PropertyNode>

Returns:

the list of found property nodes
getAllProperties
(ClassNode
the ClassNode
type
,
boolean
whether to include super properties
includeSuperProperties
,
boolean
whether to include static properties
includeStatic
,
boolean
whether to include JavaBean pseudo (getXXX/isYYY) properties with no corresponding field
includePseudoGetters
,
boolean
whether to include JavaBean pseudo (setXXX) properties with no corresponding field
includePseudoSetters
,
boolean
are properties gathered first from parent classes
superFirst
)

Get all properties including JavaBean pseudo properties matching JavaBean getter or setter conventions.

private static List<PropertyNode>
getAllProperties(ClassNode origType, ClassNode type, Set<String> names, boolean includeSuperProperties, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters, boolean superFirst)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GET_PREFIXback to summary
pack-priv static final String GET_PREFIX
INTERNAL_TYPEback to summary
private static final ClassNode INTERNAL_TYPE
IS_PREFIXback to summary
pack-priv static final String IS_PREFIX
SET_PREFIXback to summary
pack-priv static final String SET_PREFIX

Constructor Detail

BeanUtilsback to summary
public BeanUtils()

Method Detail

addExplicitPropertiesback to summary
private static void addExplicitProperties(ClassNode cNode, List<PropertyNode> result, Set<String> names, boolean includeStatic)
addIfMissingback to summary
private static void addIfMissing(ClassNode cNode, List<PropertyNode> result, Set<String> names, MethodNode mNode, ClassNode returnType, String propName, Statement getter, Statement setter)
addPseudoPropertiesback to summary
public static void addPseudoProperties(ClassNode origType, ClassNode cNode, List<PropertyNode> result, Set<String> names, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters)
addPseudoPropertiesback to summary
public static void addPseudoProperties(ClassNode origType, ClassNode cNode, List<PropertyNode> result, Set<String> names, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters, boolean traverseSuperClasses)
getAllPropertiesback to summary
public static List<PropertyNode> getAllProperties(ClassNode type, boolean includeSuperProperties, boolean includeStatic, boolean includePseudoGetters)

Get all properties including JavaBean pseudo properties matching getter conventions.

Parameters
type:ClassNode

the ClassNode

includeSuperProperties:boolean

whether to include super properties

includeStatic:boolean

whether to include static properties

includePseudoGetters:boolean

whether to include JavaBean pseudo (getXXX/isYYY) properties with no corresponding field

Returns:List<PropertyNode>

the list of found property nodes

getAllPropertiesback to summary
public static List<PropertyNode> getAllProperties(ClassNode type, boolean includeSuperProperties, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters, boolean superFirst)

Get all properties including JavaBean pseudo properties matching JavaBean getter or setter conventions.

Parameters
type:ClassNode

the ClassNode

includeSuperProperties:boolean

whether to include super properties

includeStatic:boolean

whether to include static properties

includePseudoGetters:boolean

whether to include JavaBean pseudo (getXXX/isYYY) properties with no corresponding field

includePseudoSetters:boolean

whether to include JavaBean pseudo (setXXX) properties with no corresponding field

superFirst:boolean

are properties gathered first from parent classes

Returns:List<PropertyNode>

the list of found property nodes

getAllPropertiesback to summary
private static List<PropertyNode> getAllProperties(ClassNode origType, ClassNode type, Set<String> names, boolean includeSuperProperties, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters, boolean superFirst)