public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (!isPrototype()) throw new IllegalStateException(); if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } /* Add a new synthetic access method for access to <targetMethod>.
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (!isPrototype()) throw new IllegalStateException(); if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (!isPrototype()) throw new IllegalStateException(); if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (!isPrototype()) throw new IllegalStateException(); if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (!isPrototype()) throw new IllegalStateException(); if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (!isPrototype()) throw new IllegalStateException(); if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (!isPrototype()) throw new IllegalStateException(); if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) { if (!isPrototype()) throw new IllegalStateException(); if (this.synthetics == null) this.synthetics = new HashMap[MAX_SYNTHETICS]; if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5); SyntheticMethodBinding accessMethod = null; char[] selector = CharOperation.concat(TypeConstants.SYNTHETIC_SWITCH_ENUM_TABLE, enumBinding.constantPoolName()); CharOperation.replace(selector, '/', '$'); final String key = new String(selector); SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(key); // first add the corresponding synthetic field if (accessors == null) { // then create the synthetic method final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]); accessors[0] = accessMethod; } else { if ((accessMethod = accessors[0]) == null) { final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key); accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector); accessors[0] = accessMethod; } } return accessMethod; } public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {