# selfReferenced method

1. @protected

bool selfReferenced([

1. String? podName,
2. String? candidateName

])

Checks if a candidate pod is a self-reference.

This method detects circular references where a pod depends on itself, either directly or through factory method relationships.

`podName` the name of the pod requiring the dependency `candidateName` the name of the candidate pod

Returns `true` if the candidate is a self-reference, `false` otherwise

## Implementation

    @protected
    bool selfReferenced([String? podName, String? candidateName]) {
      return podName != null && candidateName != null &&
        (podName.equals(candidateName) || (containsDefinition(podName) && podName.equals(getLocalMergedPodDefinition(candidateName).factoryMethod.podName)));
    }