Code example for AnnotatedElement

Methods: getAnnotation

0
		private int weight;
		 
		public SortOrderInfo(AnnotatedElement element)
		{ 
			super(); 
			DefaultSortOrder defaultSortOrder = element.getAnnotation(DefaultSortOrder.class);
			if(defaultSortOrder != null)
			{ 
				this.order = defaultSortOrder.order();
				this.weight = defaultSortOrder.weight();
				validFlagOn(); 
			} 
		} 
		 
		public SortOrderInfo(SortOrder order, int weight)
		{ 
			super(); 
			this.order = order;
			this.weight = weight;
			validFlagOn(); 
		}