APIdia Launch Partner
Top Description Inners Fields Constructors Methods
jdk.javadoc.internal.doclets.toolkit

public Class PropertyUtils

extends Object
Class Inheritance
Imports
java.util.HashMap, .List, .Map, .Objects, java.util.regex.Pattern, javax.lang.model.element.Element, .ExecutableElement, .TypeElement, .VariableElement, javax.lang.model.type.TypeKind, .TypeMirror, javax.lang.model.util.ElementFilter, .Types, javax.tools.Diagnostic, com.sun.source.doctree.DocCommentTree, jdk.javadoc.internal.doclets.toolkit.util.Utils, .VisibleMemberTable

This class provides basic JavaFX property related utility methods. Refer to the JavaFX conventions in the VisibleMemberTable comments.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
PropertyUtils.PropertyHelper

A utility class to manage the property-related methods that should be synthesized or updated.

Field Summary

Modifier and TypeField and Description
pack-priv final BaseConfiguration
pack-priv final Pattern
pack-priv final boolean
pack-priv final TypeMirror
pack-priv final Map<TypeElement, PropertyUtils.PropertyHelper>
pack-priv final Types

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the base name of a property method.
getBaseName
(ExecutableElement
a property method
propertyMethod
)

Returns a base name for a property method.

public String

Returns:

the property getter's name.
getGetName
(ExecutableElement
a property method
propertyMethod
)

Returns a property getter's name.

public String

Returns:

the property is getter's name.
getIsName
(ExecutableElement
a property method
propertyMethod
)

Returns an "is" method's name for a property method.

public PropertyUtils.PropertyHelper

Returns:

the property helper
getPropertyHelper
(TypeElement
a type element
typeElement
)

Returns a property helper for the given type element.

public String

Returns:

the property setter's method name.
getSetName
(ExecutableElement
a property method
propertyMethod
)

Returns a property setter's name.

public boolean

Returns:

true if the property could have an "is" method, false otherwise.
hasIsMethod
(ExecutableElement
a property method
propertyMethod
)

Returns true if a property method could have an "is" method, meaning isAcme could exist for a property method.

public boolean

Returns:

true if the method is a property method, false otherwise.
isPropertyMethod
(ExecutableElement
a method
method
)

Returns true if the method is a property method.

public boolean

Returns:

true if setter method, false otherwise.
isValidSetterMethod
(ExecutableElement
a setter method
setterMethod
)

Returns true if the given setter method is a valid property setter method.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

configurationback to summary
pack-priv final BaseConfiguration configuration
fxMethodPatternsback to summary
pack-priv final Pattern fxMethodPatterns
javafxback to summary
pack-priv final boolean javafx
jbObservableTypeback to summary
pack-priv final TypeMirror jbObservableType
propertyHelpersback to summary
pack-priv final Map<TypeElement, PropertyUtils.PropertyHelper> propertyHelpers
typeUtilsback to summary
pack-priv final Types typeUtils

Constructor Detail

PropertyUtilsback to summary
pack-priv PropertyUtils(BaseConfiguration configuration)

Method Detail

getBaseNameback to summary
public String getBaseName(ExecutableElement propertyMethod)

Returns a base name for a property method. Supposing we have BooleanProperty acmeProperty(), then "acme" will be returned.

Parameters
propertyMethod:ExecutableElement

a property method

Returns:String

the base name of a property method.

getGetNameback to summary
public String getGetName(ExecutableElement propertyMethod)

Returns a property getter's name. Supposing we have a property method DoubleProperty acmeProperty(), then "getAcme" will be returned.

Parameters
propertyMethod:ExecutableElement

a property method

Returns:String

the property getter's name.

getIsNameback to summary
public String getIsName(ExecutableElement propertyMethod)

Returns an "is" method's name for a property method. Supposing we have a property method BooleanProperty acmeProperty(), then "isAcme" will be returned.

Parameters
propertyMethod:ExecutableElement

a property method

Returns:String

the property is getter's name.

getPropertyHelperback to summary
public PropertyUtils.PropertyHelper getPropertyHelper(TypeElement typeElement)

Returns a property helper for the given type element.

Parameters
typeElement:TypeElement

a type element

Returns:PropertyUtils.PropertyHelper

the property helper

getSetNameback to summary
public String getSetName(ExecutableElement propertyMethod)

Returns a property setter's name. Supposing we have a property method DoubleProperty acmeProperty(), then "setAcme" will be returned.

Parameters
propertyMethod:ExecutableElement

a property method

Returns:String

the property setter's method name.

hasIsMethodback to summary
public boolean hasIsMethod(ExecutableElement propertyMethod)

Returns true if a property method could have an "is" method, meaning isAcme could exist for a property method.

Parameters
propertyMethod:ExecutableElement

a property method

Returns:boolean

true if the property could have an "is" method, false otherwise.

isPropertyMethodback to summary
public boolean isPropertyMethod(ExecutableElement method)

Returns true if the method is a property method.

Parameters
method:ExecutableElement

a method

Returns:boolean

true if the method is a property method, false otherwise.

isValidSetterMethodback to summary
public boolean isValidSetterMethod(ExecutableElement setterMethod)

Returns true if the given setter method is a valid property setter method.

Parameters
setterMethod:ExecutableElement

a setter method

Returns:boolean

true if setter method, false otherwise.

jdk.javadoc.internal.doclets.toolkit back to summary

public Class PropertyUtils.PropertyHelper

extends Object
Class Inheritance
  • java.lang.Object
  • jdk.javadoc.internal.doclets.toolkit.PropertyUtils.PropertyHelper

A utility class to manage the property-related methods that should be synthesized or updated. A property may comprise a field (that is typically private, if present), a fooProperty() method (which is the defining characteristic for a property), a getFoo() method and/or a setFoo(Foo foo) method. Either the field (if present) or the fooProperty() method should have a comment. If there is no field, or no comment on the field, the description for the property will be derived from the description of the fooProperty() method. If any method does not have a comment, one will be provided.

Field Summary

Modifier and TypeField and Description
private Map<Element, Element>

Constructor Summary

AccessConstructor and Description
private
PropertyHelper(BaseConfiguration configuration, TypeElement typeElement)

Method Summary

Modifier and TypeMethod and Description
private void
private void
addToPropertiesMap(BaseConfiguration configuration, Element propertyMethod, Element commentSource)

private void
computeProperties(BaseConfiguration configuration, TypeElement typeElement)

public Element

Returns:

the element for the property documentation, null if there is none.
getPropertyElement
(Element
the member for which the property documentation is needed.
element
)

Returns the element for the property documentation belonging to the given member.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classPropertiesMapback to summary
private Map<Element, Element> classPropertiesMap

Constructor Detail

PropertyHelperback to summary
private PropertyHelper(BaseConfiguration configuration, TypeElement typeElement)

Method Detail

addToPropertiesMapback to summary
private void addToPropertiesMap(BaseConfiguration configuration, ExecutableElement propertyMethod, VariableElement field, ExecutableElement getter, ExecutableElement setter)
addToPropertiesMapback to summary
private void addToPropertiesMap(BaseConfiguration configuration, Element propertyMethod, Element commentSource)
computePropertiesback to summary
private void computeProperties(BaseConfiguration configuration, TypeElement typeElement)
getPropertyElementback to summary
public Element getPropertyElement(Element element)

Returns the element for the property documentation belonging to the given member.

Parameters
element:Element

the member for which the property documentation is needed.

Returns:Element

the element for the property documentation, null if there is none.