/** * This <code>register</code> method is used to register a label based on its name and path. * Registration like this is done to ensure that the label can be resolved based on a parameter * name or path. * * @param label this is the label that is to be registered */ public void register(Label label) throws Exception { if (label.isAttribute()) { register(label, attributes); } else if (label.isText()) { register(label, texts); } else { register(label, elements); } }
/** * Constructor for the <code>CacheLabel</code> object. This is used to create a <code>Label</code> * that acquires details from another label in such a way that any logic involved in acquiring * details is performed only once. * * @param label this is the label to acquire the details from */ public CacheLabel(Label label) throws Exception { this.annotation = label.getAnnotation(); this.decorator = label.getDecorator(); this.attribute = label.isAttribute(); this.collection = label.isCollection(); this.contact = label.getContact(); this.depend = label.getDependent(); this.required = label.isRequired(); this.override = label.getOverride(); this.inline = label.isInline(); this.path = label.getPath(); this.type = label.getType(); this.name = label.getName(); this.entry = label.getEntry(); this.data = label.isData(); this.label = label; }