Top Description Inners Fields Constructors Methods
org.kohsuke.args4j.apt

public Class AnnotationVisitorReorderer

extends Object
implements AnnotationVisitor
Class Inheritance
All Implemented Interfaces
org.kohsuke.args4j.apt.AnnotationVisitor
Imports
java.util.*

Reorders the annotation according to their canonical name

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private List<OptionWithUsage>
private AnnotationVisitor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

argumentsback to summary
private List<OptionWithUsage> arguments
targetback to summary
private AnnotationVisitor target

Constructor Detail

AnnotationVisitorReordererback to summary
public AnnotationVisitorReorderer(AnnotationVisitor target)

Method Detail

doneback to summary
public void done()

Implements org.kohsuke.args4j.apt.AnnotationVisitor.done.

onOptionback to summary
public void onOption(String name, String usage)

Implements org.kohsuke.args4j.apt.AnnotationVisitor.onOption.

onOptionback to summary
public void onOption(OptionWithUsage optionWithUsage)

Implements org.kohsuke.args4j.apt.AnnotationVisitor.onOption.

reorderArgumentsback to summary
private void reorderArguments()
org.kohsuke.args4j.apt back to summary

private Class AnnotationVisitorReorderer.NaturalOrderOptionsComparator

extends Object
implements Comparator<OptionWithUsage>
Class Inheritance
  • java.lang.Object
  • org.kohsuke.args4j.apt.AnnotationVisitorReorderer.NaturalOrderOptionsComparator
All Implemented Interfaces
java.util.Comparator

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
compare(OptionWithUsage
the first object to be compared.
o1
,
OptionWithUsage
the second object to be compared.
o2
)

Implements java.util.Comparator.compare.

Compares its two arguments for order.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

NaturalOrderOptionsComparatorback to summary
private NaturalOrderOptionsComparator()

Method Detail

compareback to summary
public int compare(OptionWithUsage o1, OptionWithUsage o2)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.

Parameters
o1:OptionWithUsage

the first object to be compared.

o2:OptionWithUsage

the second object to be compared.

Returns:int

a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.