Package org.eclipse.jdt.internal.compiler.lookup

Examples of org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.fields()


        @Override
        @Nullable
        public ResolvedField getField(@NonNull String name) {
            if (mBinding instanceof ReferenceBinding) {
                ReferenceBinding cls = (ReferenceBinding) mBinding;
                FieldBinding[] fields = cls.fields();
                if (fields != null) {
                    for (FieldBinding field : fields) {
                        if (sameChars(name, field.name)) {
                            return new EcjResolvedField(field);
                        }
View Full Code Here


    List<Element> enclosed = new ArrayList<Element>(binding.fieldCount() + binding.methods().length);
    for (MethodBinding method : binding.methods()) {
      ExecutableElement executable = new ExecutableElementImpl(_env, method);
      enclosed.add(executable);
    }
    for (FieldBinding field : binding.fields()) {
      // TODO no field should be excluded according to the JLS
      if (!field.isSynthetic()) {
         VariableElement variable = new VariableElementImpl(_env, field);
         enclosed.add(variable);
      }
View Full Code Here

        case ENUM_CONSTANT:
          FieldBinding fieldBinding = (FieldBinding) elementImpl._binding;
          if (fieldBinding.declaringClass != referenceBinding) {
            throw new IllegalArgumentException("element is not valid for the containing declared type"); //$NON-NLS-1$
          }
          for (FieldBinding field : referenceBinding.fields()) {
            if (CharOperation.equals(field.name, fieldBinding.name)) {
              return this._env.getFactory().newTypeMirror(field);
            }
          }
          break;
View Full Code Here

    List<Element> enclosed = new ArrayList<Element>(binding.fieldCount() + binding.methods().length);
    for (MethodBinding method : binding.methods()) {
      ExecutableElement executable = new ExecutableElementImpl(_env, method);
      enclosed.add(executable);
    }
    for (FieldBinding field : binding.fields()) {
      // TODO no field should be excluded according to the JLS
      if (!field.isSynthetic()) {
         VariableElement variable = new VariableElementImpl(_env, field);
         enclosed.add(variable);
      }
View Full Code Here

        case ENUM_CONSTANT:
          FieldBinding fieldBinding = (FieldBinding) elementImpl._binding;
          if (fieldBinding.declaringClass != referenceBinding) {
            throw new IllegalArgumentException("element is not valid for the containing declared type"); //$NON-NLS-1$
          }
          for (FieldBinding field : referenceBinding.fields()) {
            if (CharOperation.equals(field.name, fieldBinding.name)) {
              return this._env.getFactory().newTypeMirror(field);
            }
          }
          break;
View Full Code Here

        @Override
        @Nullable
        public ResolvedField getField(@NonNull String name) {
            if (mBinding instanceof ReferenceBinding) {
                ReferenceBinding cls = (ReferenceBinding) mBinding;
                FieldBinding[] fields = cls.fields();
                if (fields != null) {
                    for (FieldBinding field : fields) {
                        if (sameChars(name, field.name)) {
                            return new EcjResolvedField(field);
                        }
View Full Code Here

        @Override
        @Nullable
        public ResolvedField getField(@NonNull String name) {
            if (mBinding instanceof ReferenceBinding) {
                ReferenceBinding cls = (ReferenceBinding) mBinding;
                FieldBinding[] fields = cls.fields();
                if (fields != null) {
                    for (FieldBinding field : fields) {
                        if (sameChars(name, field.name)) {
                            return new EcjResolvedField(field);
                        }
View Full Code Here

        @Override
        @Nullable
        public ResolvedField getField(@NonNull String name) {
            if (mBinding instanceof ReferenceBinding) {
                ReferenceBinding cls = (ReferenceBinding) mBinding;
                FieldBinding[] fields = cls.fields();
                if (fields != null) {
                    for (FieldBinding field : fields) {
                        if (sameChars(name, field.name)) {
                            return new EcjResolvedField(field);
                        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.