Class PropertyImpl

    • Constructor Detail

      • PropertyImpl

        public PropertyImpl​(java.lang.String name,
                            JMethod getter,
                            JMethod setter,
                            java.lang.String qualifiedTypeName)

        You'll usually want to use the getProperties() factory method instead of constructing JProperties yourself. This constructor is exposed just in case the default rules in the factory method for identifying properties are insufficient for some use case.

    • Method Detail

      • getType

        public JClass getType()
        Returns a JClass which represents the type of this property.
        Specified by:
        getType in interface JProperty
      • getSimpleName

        public java.lang.String getSimpleName()
        Returns the simple name of this property. For example, for a property manifest by getFoo() and setFoo(), this will return 'foo'.
        Specified by:
        getSimpleName in interface JElement
        Overrides:
        getSimpleName in class ElementImpl
      • getQualifiedName

        public java.lang.String getQualifiedName()
        Returns the simple name of this property. For example, for a property manifest by getFoo() and setFoo(), this will return 'foo'.
        Specified by:
        getQualifiedName in interface JElement
      • getSetter

        public JMethod getSetter()
        Returns a JMethod which represents the setter for this property. Returns null if this property is view-only.
        Specified by:
        getSetter in interface JProperty
      • getGetter

        public JMethod getGetter()
        Returns a JMethod which represents the getter for this property. Returns null if this property is write-only.
        Specified by:
        getGetter in interface JProperty
      • setSetter

        public void setSetter​(JMethod method)
        Returns annotations with the given name that are found on this property's getter and/or setter. public JAnnotation[] getAnnotations(String named) { return combine((mGetter == null) ? BaseJElement.NO_ANNOTATION : mGetter.getAnnotations(named), (mSetter == null) ? BaseJElement.NO_ANNOTATION : mSetter.getAnnotations(named)); }
      • setGetter

        public void setGetter​(JMethod method)
      • accept

        public void accept​(JVisitor visitor)
        Description copied from interface: JElement

        Accepts the given visitor.

        Specified by:
        accept in interface JElement
      • toString

        public java.lang.String toString()
        Description copied from interface: JElement

        Returns the same String as getQualifiedName().

        Specified by:
        toString in interface JElement
        Overrides:
        toString in class ElementImpl