"Trim Method Exclude Parameter" Window

Contents:

Overview

Use this dialog to create or modify a parameter that excludes one or more methods from being removed by the "trim" tool. The finished parameter will appear in the Trim Exclusion window's "Exclusion parameter" list. A method exclusion parameter can be thought of as consisting of the following components (mandatory components in bold): For a method to match a given exclusion parameter, it must match all the components of the parameter. You can modify the package qualifiers component of the parameter by selecting the "Containing package" tab pane. You can modify the class modifiers, class name, class extends and implements clause components of the parameter by selecting the "Containing class" tab pane. All the other components can be modified by selecting the "Method" tab.

Containing package tab

Name field

Enter the package name. You may use the "*" wildcard. For example:

Parameter Matches
* any package name
pack1.pack2 only pack1.pack2
pack1.p* any subpackages of pack1 that start with "p"

Containing class tab

Access modifier list

Optional. Specifies the class access modifier. You may select public or package. Only classes matching the specified access modifier will match the exclusion parameter.

Modifier list

Optional. Specifies the class modifiers other than access modifiers. You can select more than one modifier. Only classes matching all of the specified modifiers will match the exclusion parameter.

Name field

Enter the class name. You may use the "*" wildcard. For example:

Parameter Matches
* any class name
Class1 only Class1
C* any class name starting with "C"

Extends field

Optional. Enter the fully qualified class name that a matching class must directly or indirectly extend. You cannot use wildcards.

Implements field

Optional. Enter the fully qualified interface names that a matching class must directly or indirectly implement. If you specifiy more than one interface name then you must separate the names with commas. You cannot use wildcards.

"Annotated by" field

Optional. Enter the fully qualified class name of an annotation that a matching class must have. You can use the "*" wildcard. Do not include the "@" character.

"Exclude class as well" box

Select this box if you wish the containing class of any matching method to be excluded in addition to the method itself.

Method tab

Access modifier list

Optional. Specifies the method access modifier. You may select public, protected, package or private. Only methods matching the specified access modifier will match the exclusion parameter.

Modifier list

Optional. Specifies the method modifiers other than access modifiers. You can select more than one modifier. Only methods matching all of the specified modifiers will match the exclusion parameter.

Name field

Enter the method name. You may use the "*" wildcard. For example:

Parameter Matches
* any method name
method1 only method1
m* any method name starting with "m"

Arguments field

Enter the argument types of the method. You may enter zero or more types. If more than one type is entered then they must be comma separated. The types may be primitive types such as int or fully qualified class names such as java.lang.String. You can use a single wildcard to indicate that any parameters should be matched. You may not use wildcards within an individual argument type. For example:
Parameter Matches
* any method parameter types including methods that take no arguments at all.
int, java.lang.String[] only methods that take exactly int, java.lang.String[]
only matches methods that take no arguments at all.

Throws field

Enter the exception types that must appear in the "throws" clause of matching methods. The types must be fully qualified class names such as java.lang.IOException. You may enter one or more types. If more than one type is entered then they must be comma separated and, to match, a particular method must throw each of the specified types. However, note that any exception type that you specify will also be matched by subclasses of that type. You may not use wildcards.

"Annotated by" field

Optional. Enter the fully qualified class name of an annotation that a matching method must have. You can use the "*" wildcard. Do not include the "@" character.

"Parameter so far" field

Displays the exclusion parameter specified so far in "ZKM Script" syntax.

Explanation area

Displays a plain language explanation of the effect of the exclusion parameter specified so far.


© 2019 Zelix Pty Ltd