/// <summary> /// This is used to remove the method part from the specified map. /// Removal is performed using the name of the method part. If it /// has been scanned and added to the map then it will be removed /// and will not form part of the class schema. /// </summary> /// <param name="part"> /// this is the part to be removed from the map /// </param> /// <param name="map"> /// this is the map to removed the method part from /// </param> public void Remove(MethodPart part, PartMap map) { String name = part.GetName(); if (name != null) { map.Remove(name); } }
/// <summary> /// This is used to determine whether the specified method can be /// inserted into the given <c>PartMap</c>. This ensures /// that only the most specialized method is considered, which /// enables annotated methods to be overridden in subclasses. /// </summary> /// <param name="method"> /// this is the method part that is to be inserted /// </param> /// <param name="map"> /// this is the part map used to contain the method /// </param> public void Process(MethodPart method, PartMap map) { String name = method.GetName(); if (name != null) { map.put(name, method); } }
/// <summary> /// Constructor for the <c>MethodScanner</c> object. This is /// used to create an object that will scan the specified class /// such that all bean property methods can be paired under the /// XML annotation specified within the class. /// </summary> /// <param name="type"> /// this is the type that is to be scanned for methods /// </param> public MethodScanner(Class type, DefaultType access) { this.factory = new MethodPartFactory(); this.hierarchy = new Hierarchy(type); this.write = new PartMap(); this.read = new PartMap(); this.access = access; this.type = type; this.Scan(type); }