Example usage for org.eclipse.jdt.core.dom BodyDeclaration getProperty

List of usage examples for org.eclipse.jdt.core.dom BodyDeclaration getProperty

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.dom BodyDeclaration getProperty.

Prototype

public final Object getProperty(String propertyName) 

Source Link

Document

Returns the value of the named property of this node, or null if none.

Usage

From source file:com.github.parzonka.ccms.sorter.comparator.BodyDeclarationComparator.java

License:Open Source License

private int preserveRelativeOrder(BodyDeclaration bodyDeclaration1, BodyDeclaration bodyDeclaration2) {
    final int value1 = ((Integer) bodyDeclaration1.getProperty(CompilationUnitSorter.RELATIVE_ORDER))
            .intValue();/*w w  w  . ja v a2 s.  c  o m*/
    final int value2 = ((Integer) bodyDeclaration2.getProperty(CompilationUnitSorter.RELATIVE_ORDER))
            .intValue();
    return value1 - value2;
}