1 16 17 package org.springframework.beans.factory.parsing; 18 19 import org.springframework.beans.BeanMetadataElement; 20 import org.springframework.util.Assert; 21 22 29 public class AliasDefinition implements BeanMetadataElement { 30 31 private final String beanName; 32 33 private final String alias; 34 35 private final Object source; 36 37 38 43 public AliasDefinition(String beanName, String alias) { 44 this(beanName, alias, null); 45 } 46 47 53 public AliasDefinition(String beanName, String alias, Object source) { 54 Assert.notNull(beanName, "Bean name must not be null"); 55 Assert.notNull(alias, "Alias must not be null"); 56 this.beanName = beanName; 57 this.alias = alias; 58 this.source = source; 59 } 60 61 62 65 public String getBeanName() { 66 return beanName; 67 } 68 69 72 public String getAlias() { 73 return alias; 74 } 75 76 public Object getSource() { 77 return source; 78 } 79 80 } 81 | Popular Tags |