Example usage for org.eclipse.jdt.core.search IJavaSearchConstants TYPE_ARGUMENT_TYPE_REFERENCE

List of usage examples for org.eclipse.jdt.core.search IJavaSearchConstants TYPE_ARGUMENT_TYPE_REFERENCE

Introduction

In this page you can find the example usage for org.eclipse.jdt.core.search IJavaSearchConstants TYPE_ARGUMENT_TYPE_REFERENCE.

Prototype

int TYPE_ARGUMENT_TYPE_REFERENCE

To view the source code for org.eclipse.jdt.core.search IJavaSearchConstants TYPE_ARGUMENT_TYPE_REFERENCE.

Click Source Link

Document

Return only type references used as a type argument in a parameterized type or a parameterized method.

Usage

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeOnlyTypeArguments() {
    super.consumeOnlyTypeArguments();
    if ((this.patternFineGrain & IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE) != 0) {
        int length = this.genericsLengthStack[this.genericsLengthPtr];
        if (length == 1) {
            TypeReference typeReference = (TypeReference) this.genericsStack[this.genericsPtr];
            if (!(typeReference instanceof Wildcard)) {
                this.patternLocator.match(typeReference, this.nodeSet);
            }/*from www  . j a  v a2s  .com*/
        }
    }
}

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeTypeArgumentList1() {
    super.consumeTypeArgumentList1();
    if ((this.patternFineGrain & IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE) != 0) {
        for (int i = this.genericsPtr - this.genericsLengthStack[this.genericsLengthPtr]
                + 1; i <= this.genericsPtr; i++) {
            TypeReference typeReference = (TypeReference) this.genericsStack[i];
            if (!(typeReference instanceof Wildcard)) {
                this.patternLocator.match(typeReference, this.nodeSet);
            }//from www.  j a v a  2s  .c o m
        }
    }
}

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeTypeArgumentList2() {
    super.consumeTypeArgumentList2();
    if ((this.patternFineGrain & IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE) != 0) {
        for (int i = this.genericsPtr - this.genericsLengthStack[this.genericsLengthPtr]
                + 1; i <= this.genericsPtr; i++) {
            TypeReference typeReference = (TypeReference) this.genericsStack[i];
            if (!(typeReference instanceof Wildcard)) {
                this.patternLocator.match(typeReference, this.nodeSet);
            }/*from   w w  w. j  a  v  a2  s .  c o  m*/
        }
    }
}

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeTypeArgumentList3() {
    super.consumeTypeArgumentList3();
    if ((this.patternFineGrain & IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE) != 0) {
        for (int i = this.genericsPtr - this.genericsLengthStack[this.genericsLengthPtr]
                + 1; i <= this.genericsPtr; i++) {
            TypeReference typeReference = (TypeReference) this.genericsStack[i];
            if (!(typeReference instanceof Wildcard)) {
                this.patternLocator.match(typeReference, this.nodeSet);
            }/*  w  w w  .  java2s . c o m*/
        }
    }
}

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeTypeArgumentReferenceType1() {
    super.consumeTypeArgumentReferenceType1();
    if ((this.patternFineGrain & IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE) != 0) {
        int length = this.genericsLengthStack[this.genericsLengthPtr];
        if (length == 1) {
            TypeReference typeReference = (TypeReference) this.genericsStack[this.genericsPtr];
            TypeReference[] typeArguments = null;
            if (typeReference instanceof ParameterizedSingleTypeReference) {
                typeArguments = ((ParameterizedSingleTypeReference) typeReference).typeArguments;
            } else if (typeReference instanceof ParameterizedQualifiedTypeReference) {
                TypeReference[][] allTypeArguments = ((ParameterizedQualifiedTypeReference) typeReference).typeArguments;
                typeArguments = allTypeArguments[allTypeArguments.length - 1];
            }//  w  ww .ja  v  a 2 s .c  o  m
            if (typeArguments != null) {
                for (int i = 0, ln = typeArguments.length; i < ln; i++) {
                    if (!(typeArguments[i] instanceof Wildcard)) {
                        this.patternLocator.match(typeArguments[i], this.nodeSet);
                    }
                }
            }
        }
    }
}

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeTypeArgumentReferenceType2() {
    super.consumeTypeArgumentReferenceType2();
    if ((this.patternFineGrain & IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE) != 0) {
        int length = this.genericsLengthStack[this.genericsLengthPtr];
        if (length == 1) {
            TypeReference typeReference = (TypeReference) this.genericsStack[this.genericsPtr];
            TypeReference[] typeArguments = null;
            if (typeReference instanceof ParameterizedSingleTypeReference) {
                typeArguments = ((ParameterizedSingleTypeReference) typeReference).typeArguments;
            } else if (typeReference instanceof ParameterizedQualifiedTypeReference) {
                TypeReference[][] allTypeArguments = ((ParameterizedQualifiedTypeReference) typeReference).typeArguments;
                typeArguments = allTypeArguments[allTypeArguments.length - 1];
            }//from  w w w  .jav a2s .c  o  m
            if (typeArguments != null) {
                for (int i = 0, ln = typeArguments.length; i < ln; i++) {
                    if (!(typeArguments[i] instanceof Wildcard)) {
                        this.patternLocator.match(typeArguments[i], this.nodeSet);
                    }
                }
            }
        }
    }
}

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchLocatorParser.java

License:Open Source License

protected void consumeTypeArguments() {
    super.consumeTypeArguments();
    if ((this.patternFineGrain & IJavaSearchConstants.TYPE_ARGUMENT_TYPE_REFERENCE) != 0) {
        int length = this.genericsLengthStack[this.genericsLengthPtr];
        if (length == 1) {
            TypeReference typeReference = (TypeReference) this.genericsStack[this.genericsPtr];
            if (!(typeReference instanceof Wildcard)) {
                this.patternLocator.match(typeReference, this.nodeSet);
            }//w w  w  . ja  va 2s.  c  o  m
        }
    }
}