arrayInitializer ================ .. include:: /ref/targets/autogen/descriptions/arrayinitializer.txt .. contents:: Configuration options --------------------- contains ~~~~~~~~ Check if every configured :doc:`arrayInitializerMember` is present inside the array initializer. .. code-block:: yaml search: arrayInitializer: contains: - value: "Hello" .. code-block:: java :emphasize-lines: 1-5 String[] values = { "Hello", "Beautiful", "World" }; containsOnly ~~~~~~~~~~~~ Check if only the configured :doc:`arrayInitializerMember`\s are present inside the array initializer. This means the recipe will not trigger if the initializer contains a member that does not match any of the given :doc:`arrayInitializerMember`\s. .. code-block:: yaml search: arrayInitializer: containsOnly: - value: "Hello" - value: "World" .. code-block:: java :emphasize-lines: 7-10 String[] values = { "Hello", "Beautiful", "World" }; String[] values2 = { "Hello", "World" }; .. include:: /ref/targets/partials/searcher.txt