net.sourceforge.pmd

## Interface PropertySource

- All Known Subinterfaces:
    Renderer, Rule, StatisticalRule
  All Known Implementing Classes:
    AbstractAccumulatingRenderer, AbstractCommentRule, AbstractDelegateRule, AbstractDomXmlRule, AbstractEcmascriptRule, AbstractIncrementingRenderer, AbstractInefficientZeroCheck, AbstractJavaRule, AbstractJspRule, AbstractJUnitRule, AbstractNcssCountRule, AbstractOptimizationRule, AbstractPoorMethodCall, AbstractPropertySource, AbstractRenderer, AbstractRule, AbstractStatisticalJavaRule, AbstractSunSecureRule, AbstractXmlRule, AccessorClassGenerationRule, AppendCharacterWithCharRule, ArrayIsStoredDirectlyRule, AssignmentInOperandRule, AssignmentToNonFinalStaticRule, AvoidBranchingStatementAsLastInLoopRule, AvoidCallingFinalizeRule, AvoidCatchingThrowableRule, AvoidDeeplyNestedIfStmtsRule, AvoidDollarSignsRule, AvoidDuplicateLiteralsRule, AvoidFieldNameMatchingMethodNameRule, AvoidFieldNameMatchingTypeNameRule, AvoidInstantiatingObjectsInLoopsRule, AvoidMultipleUnaryOperatorsRule, AvoidReassigningParametersRule, AvoidUsingHardCodedIPRule, AvoidUsingOctalValuesRule, BeanMembersShouldSerializeRule, BigIntegerInstantiationRule, BooleanInstantiationRule, BrokenNullCheckRule, CheckResultSetRule, CheckSkipResultRule, ClassNamingConventionsRule, CloneMethodMustImplementCloneable, CloseResourceRule, CodeInCommentsRule, CommentContentRule, CommentRequiredRule, CommentSizeRule, CompareObjectsWithEqualsRule, ConfusingTernaryRule, ConsecutiveLiteralAppendsRule, ConsistentReturnRule, ConstructorCallsOverridableMethodRule, CouplingBetweenObjectsRule, CSVRenderer, CyclomaticComplexityRule, DataflowAnomalyAnalysisRule, DFAGraphRule, DontImportJavaLangRule, DontImportSunRule, DoubleCheckedLockingRule, DuplicateImportsRule, DuplicateJspImportsRule, EcmascriptXPathRule, EmacsRenderer, ExceptionAsFlowControlRule, ExcessiveClassLengthRule, ExcessiveImportsRule, ExcessiveLengthRule, ExcessiveMethodLengthRule, ExcessiveNodeCountRule, ExcessiveParameterListRule, ExcessivePublicCountRule, GenericClassCounterRule, GenericLiteralCheckerRule, GodClassRule, HeaderCommentsRule, HTMLRenderer, IDEAJRenderer, IdempotentOperationsRule, ImmutableFieldRule, ImportFromSamePackageRule, InefficientEmptyStringCheckRule, InefficientStringBufferingRule, InsufficientStringBufferDeclarationRule, JavadocRule, JUnitAssertionsShouldIncludeMessageRule, JUnitTestsShouldIncludeAssertRule, JUnitUseExpectedRule, LawOfDemeterRule, LocalVariableCouldBeFinalRule, LooseCoupling, LooseCouplingRule, LoosePackageCouplingRule, MethodArgumentCouldBeFinalRule, MethodNamingConventionsRule, MethodReturnsInternalArrayRule, MethodWithSameNameAsEnclosingClassRule, MockRule, MoreThanOneLoggerRule, NcssConstructorCountRule, NcssMethodCountRule, NcssTypeCountRule, NoInlineStyleInformationRule, NonThreadSafeSingletonRule, NPathComplexityRule, NullAssignmentRule, OnlyOneReturnRule, OverrideBothEqualsAndHashcodeRule, PositionalIteratorRule, PrematureDeclarationRule, PreserveStackTraceRule, RedundantFieldInitializerRule, RuleReference, SignatureDeclareThrowsException, SignatureDeclareThrowsExceptionRule, SimplifyBooleanReturnsRule, SingularFieldRule, StringConcatenationRule, StringInstantiationRule, StringToStringRule, SummaryHTMLRenderer, SuspiciousHashcodeMethodNameRule, SuspiciousOctalEscapeRule, SwitchDensityRule, SymbolTableTestRule, TestClassWithoutTestCasesRule, TextColorRenderer, TextPadRenderer, TextRenderer, TooManyFieldsRule, UnnecessaryCaseChangeRule, UnnecessaryCastRule, UnnecessaryConversionTemporaryRule, UnnecessaryFullyQualifiedNameRule, UnnecessaryLocalBeforeReturnRule, UnnecessaryReturnRule, UnnecessaryWrapperObjectCreationRule, UnsynchronizedStaticDateFormatterRule, UnusedFormalParameterRule, UnusedImports, UnusedImportsRule, UnusedLocalVariableRule, UnusedModifierRule, UnusedPrivateFieldRule, UnusedPrivateMethodRule, UseCollectionIsEmptyRule, UseIndexOfCharRule, UselessAssignment, UselessOperationOnImmutableRule, UselessOverridingMethodRule, UselessStringValueOfRule, UseSingletonRule, UseStringBufferForStringAppendsRule, UseStringBufferLengthRule, VariableNamingConventionsRule, VBHTMLRenderer, XMLRenderer, XmlXPathRule, XPathRule, XSLTRenderer, YAHTMLRenderer

      public interface PropertySource

  Author:
    Brian Remedios

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `definePropertyDescriptor(PropertyDescriptor<?> propertyDescriptor)` Define a new property via a PropertyDescriptor.
    `String` | `dysfunctionReason()` Returns a description of why the receiver may be dysfunctional.
    `Map<PropertyDescriptor<?>,Object>` | `getPropertiesByPropertyDescriptor()` Returns all the current property values for the receiver or an immutable empty map if none are specified.
    `<T> T` | `getProperty(PropertyDescriptor<T> propertyDescriptor)` Get the typed value for the given property.
    `PropertyDescriptor<?>` | `getPropertyDescriptor(String name)` Get the PropertyDescriptor for the given property name.
    `List<PropertyDescriptor<?>>` | `getPropertyDescriptors()` Get the PropertyDescriptors for all defined properties.
    `boolean` | `hasDescriptor(PropertyDescriptor<?> descriptor)` Returns whether this Rule has the specified PropertyDescriptor.
    `Set<PropertyDescriptor<?>>` | `ignoredProperties()` Return the properties that are effectively ignored due to the configuration of the rule and values held by other properties.
    `<T> void` | `setProperty(PropertyDescriptor<T> propertyDescriptor, T value)` Set the property value specified (will be type-checked)
    `void` | `useDefaultValueFor(PropertyDescriptor<?> desc)` Clears out any user-specified value for the property allowing it to use the default value in the descriptor.
    `boolean` | `usesDefaultValues()` Returns whether this Rule uses default values for properties.

- - ### Method Detail

    - #### definePropertyDescriptor

          void definePropertyDescriptor(PropertyDescriptor<?> propertyDescriptor)
                                        throws IllegalArgumentException

      Define a new property via a PropertyDescriptor.
      Parameters:
        `propertyDescriptor` - The property descriptor.
      Throws:
        `IllegalArgumentException` - If there is already a property defined the same name.

    - #### getPropertyDescriptor

          PropertyDescriptor<?> getPropertyDescriptor(String name)

      Get the PropertyDescriptor for the given property name.
      Parameters:
        `name` - The name of the property.
      Returns:
        The PropertyDescriptor for the named property, `null` if there is no such property defined.

    - #### getPropertyDescriptors

          List<PropertyDescriptor<?>> getPropertyDescriptors()

      Get the PropertyDescriptors for all defined properties. The properties are returned sorted by UI order.
      Returns:
        The PropertyDescriptors in UI order.

    - #### getProperty

          <T> T getProperty(PropertyDescriptor<T> propertyDescriptor)

      Get the typed value for the given property.
      Type Parameters:
        `T` - The underlying type of the property descriptor.
      Parameters:
        `propertyDescriptor` - The property descriptor.
      Returns:
        The property value.

    - #### setProperty

          <T> void setProperty(PropertyDescriptor<T> propertyDescriptor,
                             T value)

      Set the property value specified (will be type-checked)
      Type Parameters:
        `T` - The underlying type of the property descriptor.
      Parameters:
        `propertyDescriptor` - The property descriptor.
        `value` - The value to set.

    - #### getPropertiesByPropertyDescriptor

          Map<PropertyDescriptor<?>,Object> getPropertiesByPropertyDescriptor()

      Returns all the current property values for the receiver or an immutable empty map if none are specified.

    - #### hasDescriptor

          boolean hasDescriptor(PropertyDescriptor<?> descriptor)

      Returns whether this Rule has the specified PropertyDescriptor.
      Parameters:
        `descriptor` - The PropertyDescriptor for which to check.
      Returns:
        boolean `true` if the descriptor is present, `false` otherwise.

    - #### usesDefaultValues

          boolean usesDefaultValues()

      Returns whether this Rule uses default values for properties.
      Returns:
        boolean `true` if the properties all have default values, `false` otherwise.

    - #### useDefaultValueFor

          void useDefaultValueFor(PropertyDescriptor<?> desc)

      Clears out any user-specified value for the property allowing it to use the default value in the descriptor.
      Parameters:
        `desc` -

    - #### ignoredProperties

          Set<PropertyDescriptor<?>> ignoredProperties()

      Return the properties that are effectively ignored due to the configuration of the rule and values held by other properties. This can be used to disable corresponding widgets in a UI.

    - #### dysfunctionReason

          String dysfunctionReason()

      Returns a description of why the receiver may be dysfunctional. Usually due to missing property values or some kind of conflict between values. Returns null if the receiver is ok.
      Returns:
        String

Copyright © 2002-2013 InfoEther. All Rights Reserved.