private <T extends Member> String add(T member,
											  TargetSource targetSource,
											  Map<String, Map<T, List<WeavingDetails>>> classNameToMemberToLocation) {

			final Pair<Member, TargetSource> locationKey = Pair.of(member, targetSource);

			synchronized (this) {
				final String alreadyWoven = m_wovenMembers.get(locationKey);

				if (alreadyWoven != null) {
					return alreadyWoven;
				}
			}

			final String className = member.getDeclaringClass().getName();
			final String internalClassName = className.replace('.', '/');
			final String location = generateLocationString();

			synchronized (this) {
				final Map<T, List<WeavingDetails>> memberToWeavingDetails;

				final Map<T, List<WeavingDetails>> existingMap = classNameToMemberToLocation.get(internalClassName);

				if (existingMap != null) {
					memberToWeavingDetails = existingMap;
				} else {
					memberToWeavingDetails = new HashMap<>();
					classNameToMemberToLocation.put(internalClassName, memberToWeavingDetails);
				}

				m_wovenMembers.put(locationKey, location);

				final List<WeavingDetails> weavingDetailsList;

				final List<WeavingDetails> existingList = memberToWeavingDetails.get(member);

				if (existingList != null) {
					weavingDetailsList = existingList;
				} else {
					weavingDetailsList = new ArrayList<>();
					memberToWeavingDetails.put(member, weavingDetailsList);
				}

				weavingDetailsList.add(new WeavingDetails(location, targetSource));
			}

			synchronized (DCRWeaver.this) {
				m_pendingClasses.add(member.getDeclaringClass());
			}

			return location;
		}
Factory method.

@param pointCutRegistry The point cut registry.
@return The transformer.
ngrinder-runtime/src/main/java/net/grinder/util/weave/j2se8/DCRWeaver.java