1 11 package org.eclipse.jdt.internal.compiler.env; 12 13 public class AccessRestriction { 14 15 private AccessRule accessRule; 16 private String [] messageTemplates; 17 public AccessRestriction(AccessRule accessRule, String [] messageTemplates) { 18 this.accessRule = accessRule; 19 this.messageTemplates = messageTemplates; 20 } 21 22 27 public String getMessageTemplate() { 28 return this.messageTemplates[0]; 29 } 30 31 public String getConstructorAccessMessageTemplate() { 32 return this.messageTemplates[1]; 33 } 34 35 public String getMethodAccessMessageTemplate() { 36 return this.messageTemplates[2]; 37 } 38 39 public String getFieldAccessMessageTemplate() { 40 return this.messageTemplates[3]; 41 } 42 43 public int getProblemId() { 44 return this.accessRule.getProblemId(); 45 } 46 47 public boolean ignoreIfBetter() { 48 return this.accessRule.ignoreIfBetter(); 49 } 50 } 51 | Popular Tags |