View | Details | Raw Unified | Return to bug 211718
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java (-2 / +3 lines)
Lines 244-256 Link Here
244
	    this.selector = selector;
244
	    this.selector = selector;
245
	    this.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccStatic;
245
	    this.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccStatic;
246
		this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
246
		this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
247
		LookupEnvironment environment = declaringEnum.scope.environment();
247
	    this.thrownExceptions = Binding.NO_EXCEPTIONS;
248
	    this.thrownExceptions = Binding.NO_EXCEPTIONS;
248
		if (selector == TypeConstants.VALUES) {
249
		if (selector == TypeConstants.VALUES) {
249
		    this.returnType = declaringEnum.scope.createArrayType(declaringEnum, 1);
250
		    this.returnType = environment.createArrayType(environment.convertToParameterizedType(declaringEnum), 1);
250
		    this.parameters = Binding.NO_PARAMETERS;
251
		    this.parameters = Binding.NO_PARAMETERS;
251
		    this.purpose = SyntheticMethodBinding.EnumValues;
252
		    this.purpose = SyntheticMethodBinding.EnumValues;
252
		} else if (selector == TypeConstants.VALUEOF) {
253
		} else if (selector == TypeConstants.VALUEOF) {
253
		    this.returnType = declaringEnum;
254
		    this.returnType = environment.convertToParameterizedType(declaringEnum);
254
		    this.parameters = new TypeBinding[]{ declaringEnum.scope.getJavaLangString() };
255
		    this.parameters = new TypeBinding[]{ declaringEnum.scope.getJavaLangString() };
255
		    this.purpose = SyntheticMethodBinding.EnumValueOf;
256
		    this.purpose = SyntheticMethodBinding.EnumValueOf;
256
		}
257
		}

Return to bug 211718