Example usage for org.eclipse.jdt.internal.compiler.lookup MethodBinding isNative

List of usage examples for org.eclipse.jdt.internal.compiler.lookup MethodBinding isNative

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.lookup MethodBinding isNative.

Prototype

public final boolean isNative() 

Source Link

Usage

From source file:com.google.gwt.dev.javac.Shared.java

License:Open Source License

public static int bindingToModifierBits(MethodBinding binding) {
    int bits = 0;
    bits |= (binding.isPublic() ? MOD_PUBLIC : 0);
    bits |= (binding.isPrivate() ? MOD_PRIVATE : 0);
    bits |= (binding.isProtected() ? MOD_PROTECTED : 0);
    bits |= (binding.isStatic() ? MOD_STATIC : 0);
    bits |= (binding.isFinal() ? MOD_FINAL : 0);
    bits |= (binding.isNative() ? MOD_NATIVE : 0);
    bits |= (binding.isAbstract() ? MOD_ABSTRACT : 0);
    return bits;//from  w w w . j  a  v  a 2 s. c  o m
}

From source file:com.google.gwt.dev.jjs.impl.BuildTypeMap.java

License:Apache License

private JMethod processMethodBinding(MethodBinding b, JDeclaredType enclosingType, SourceInfo info) {
    JType returnType = getType(b.returnType);
    JMethod newMethod = program.createMethod(info, String.valueOf(b.selector), enclosingType, returnType,
            b.isAbstract(), b.isStatic(), b.isFinal(), AccessModifier.fromMethodBinding(b), b.isNative());
    addThrownExceptions(b, newMethod);/*from   w  ww.  j  a  v a  2  s .  c  o m*/
    if (b.isSynthetic()) {
        newMethod.setSynthetic();
    }

    if (enclosingType.isExternal()) {
        newMethod.setBody(null);
    }
    typeMap.put(b, newMethod);
    return newMethod;
}