protected JvmOperation findCloseMethod(LightweightTypeReference resourceType) {
		// Find the real close method,
		// which is an operation without arguments.
		// There can only be one close method with that signature.
		for(JvmType rawType: resourceType.getRawTypes()) {
			if (rawType instanceof JvmDeclaredType) {
				Iterable<JvmFeature> candidates = ((JvmDeclaredType) rawType).findAllFeaturesByName("close");
				for(JvmFeature candidate: candidates) {
					if (candidate instanceof JvmOperation
							&& ((JvmOperation) candidate).getParameters().isEmpty()) {
						return (JvmOperation) candidate;
					}
				}
			}
		}
		return null;
	}
protected JvmOperation findCloseMethod ( LightweightTypeReference resourceType ) { for ( JvmType rawType : resourceType . getRawTypes ( ) ) { if ( rawType instanceof JvmDeclaredType ) { Iterable < JvmFeature > candidates = ( ( JvmDeclaredType ) rawType ) . findAllFeaturesByName ( "close" ) ; for ( JvmFeature candidate : candidates ) { if ( candidate instanceof JvmOperation && ( ( JvmOperation ) candidate ) . getParameters ( ) . isEmpty ( ) ) { return ( JvmOperation ) candidate ; } } } } return null ; }
@since 2.18